Function: FLIST Purpose: Lists all files in a directory Category: FILES File: flist.c Author: K.G. Begeman Use: INTEGER FLIST( DIRNAME , Input CHARACTER*(*) DIRENTRY ) Output CHARACTER*(*) FLIST Returns: 0: Next directory entry returned in DIRENTRY. -1: Directory entry trunctated because DIRENTRY is not large enough. -2: No more entries in directory. -3: Error reading directory. -4: Cannot obtain current directory. DIRNAME Name of directory to list. If blank, the current directory will be listed. DIRENTRY Directory entry found in DIRNAME. Notes: The directory name may be a logical name. If it is translatable, it will be translated. Example: CHARACTER*80 NAME CALL ANYOUT( 0, 'List of files in Directory DB1:' ) WHILE (FLIST( 'DB1:', NAME ) .EQ. 0) CALL ANYOUT( 0, NAME ) CWHILE Warning: System dependent! Currently implemented for UNIX and VMS systems. Updates: Sep 25, 1990: KGB, Document created. Oct 16, 1995: KGB, Bug removed (input file name lengths). Mar 24, 2011: JPT, Changed format for file size in testbed.