xp_comm_proj/rd_dicom/Papyrus3/PapyFileSystemUnix3.c
/********************************************************************************/
/*									 	*/
/*	Papy3DGetNbFiles : Papyrus function to parse the directory and          */
/*                         return the number of files.				*/
/*										*/
/********************************************************************************/
Papy3DGetNbFiles : Papyrus function to parse the directory and
return the number of files.
Papy3DGetNbFiles : Papyrus function to parse the directory and return the number of files .
int
Papy3DGetNbFiles (char *dicomPath, int *nbFiles)
{
  struct dirent   *aDirent;
  DIR             *aDIR;
  aDIR = opendir(dicomPath);
  while((aDirent=readdir(aDIR))!=NULL)
  {
    if((strncmp(aDirent->d_name,".",1)!=0) && (strncmp(aDirent->d_name,"..",2)!=0))
      (*nbFiles)++;
  }
  closedir(aDIR);
}
int Papy3DGetNbFiles ( char * dicomPath , int * nbFiles ) { struct dirent * aDirent ; DIR * aDIR ; aDIR = opendir ( dicomPath ) ; while ( ( aDirent = readdir ( aDIR ) ) != NULL ) { if ( ( strncmp ( aDirent -> d_name , " " , 1 ) != 0 ) && ( strncmp ( aDirent -> d_name , " " , 2 ) != 0 ) ) ( * nbFiles ) ++ ; } closedir ( aDIR ) ; }
Papy3DGetNbFiles : Papyrus function to parse the directory and
return the number of files.
Papy3DGetNbFiles : Papyrus function to parse the directory and return the number of files .
/* read all the filenames of the directory. */