•  Back 
  •  Libraries 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
Topic       : Pure C Library Documentation
Author      : John Kormylo
Version     : LIB.HYP 1.0
Subject     : Documentation/Pure C Library
Nodes       : 1309
Index Size  : 32068
HCP-Version : 3
Compiled on : Atari
@charset    : atarist
@lang       : en
@default    : 
@help       : Help
@options    : +g -i -s +x +z -t4
@width      : 75
View Ref-File[ findfirst ]

#include <ext.h>

int findfirst( const char *filename, struct ffblk *ffblk,
               int attrib );
int findnext( struct ffblk *ffblk );


  <filename> is a NULL terminated string containing the pathname of
             the file(s) sought (see Pathnames).
  <ffblk> is a buffer structure (passed by address) which will return
          file info and search status.
  <attrib> contains the allowed file attribute bitflags (0 = normal):
           FA_HIDDEN    hidden
           FA_SYSTEM    system
           FA_VOLUME    volume label (exclusive)
           FA_SUBDIR    subdirectory (exclusive)
           Other bitflags are ignored.


These functions can be used to check if a file exists, return its
attributes, or search for all files which satisfy the wildcards.

findfirst() locates the first file, then findnext() is called using
the SAME <ffblk> until no more files are found.

They return 0 normally, or -1 when no file is found (see errno).

See also PCEXTLIB, Fsetdta(), Fsfirst() and Fsnext().