Online HelpPC 2.10      Quick Reference Utility     Copyright 1991 David Jurgens
 
        TC: int findfirst( const char *path, struct ffblk *ffblk, int attr)     
                                                                                
        MSC unsigned _dos_findfirst( char *path, unsigned attr,                 
                                        struct find_t *fileinfo )               
                                                                                         - prototype in dir.h, also include dos.h (MS C: dos.h only)                                                                                                       - gets disk directory via DOS 0x4E, where attr is:                                                                                                       
                        Turbo C         Microsoft C                             
                                                                                                         FA_RDONLY       _A_RDONLY                                                        FA_HIDDEN       _A_HIDDEN                                                        FA_SYSTEM       _A_SYSTEM                                                        FA_LABEL        _A_VOLID                                                         FA_DIREC        _A_SUBDIR                                                        FA_ARCH         _A_ARCH                                                                                                                  
        struct ffblk    (Turbo C)       struct find_t   (MSC)                   
            {                               {                                                char     ff_reserved[21];       char     reserved[21];                           char     ff_attrib;             char     attrib;                                 unsigned ff_ftime;              unsigned wr_time;                                unsigned ff_fdate;              unsigned wr_date;                                long     ff_fsize;              long     size;                                   char     ff_name[13];           char     name[13];                               };                              };                                                                                                                            - attributes can be logically OR'ed                                              - struct ffblk is defined in Turbo C's dir.h                                     - struct find_t is defined in MS C's dos.h                                       - updates DTA, provisions for saving/setting DTA should be made                  - normal files are always included along with files that match                     the requested attributes except when the LABEL attribute is                      requested.  It's up to the programmer to determine which                         actually match the requested attributes.                                       - returns 0 if OK, -1 if no matching files found or on error                                                                                                      - see   FILE ATTRIBUTES,  FINDNEXT,  GETDTA  and  SETDTA                                                                                                   
[helppc.bosbyte.nl]             _dos_findfirst                Home  Back  Topics