home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0040 - 0049 / ibm0040-0049 / ibm0040.tar / ibm0040 / BCPPOWL3.ZIP / PATINC.ZIP / DIR.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-28  |  2.1 KB  |  74 lines

  1. /*  dir.h
  2.  
  3.     Defines structures, macros, and functions for dealing with
  4.     directories and pathnames.
  5.  
  6.     Copyright (c) Borland International 1987,1988,1990,1991
  7.     All Rights Reserved.
  8. */
  9.  
  10. #if !defined( __DIR_H )
  11. #define __DIR_H
  12.  
  13. #if !defined( __DEFS_H )
  14. #include <_defs.h>
  15. #endif
  16.  
  17. #ifndef _FFBLK_DEF
  18. #define _FFBLK_DEF
  19. struct  ffblk   {
  20.     char        ff_reserved[21];
  21.     char        ff_attrib;
  22.     unsigned    ff_ftime;
  23.     unsigned    ff_fdate;
  24.     long        ff_fsize;
  25.     char        ff_name[13];
  26. };
  27. #endif
  28.  
  29. #define WILDCARDS 0x01
  30. #define EXTENSION 0x02
  31. #define FILENAME  0x04
  32. #define DIRECTORY 0x08
  33. #define DRIVE     0x10
  34.  
  35. #define MAXPATH   80
  36. #define MAXDRIVE  3
  37. #define MAXDIR    66
  38. #define MAXFILE   9
  39. #define MAXEXT    5
  40.  
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44.  
  45. int         _Cdecl chdir( const char *__path );
  46. int         _CType _FARFUNC findfirst( const char _FAR *__path,
  47.                               struct ffblk _FAR *__ffblk, 
  48.                               int __attrib );
  49. int         _CType _FARFUNC findnext( struct ffblk _FAR *__ffblk );
  50. void        _CType _FARFUNC fnmerge( char _FAR *__path,
  51.                             const char _FAR *__drive,
  52.                             const char _FAR *__dir,
  53.                             const char _FAR *__name,
  54.                             const char _FAR *__ext );
  55. int         _CType _FARFUNC fnsplit( const char _FAR *__path,
  56.                             char _FAR *__drive, 
  57.                             char _FAR *__dir, 
  58.                             char _FAR *__name,
  59.                             char _FAR *__ext );
  60. int         _Cdecl getcurdir( int __drive, char *__directory );
  61. char _FAR * _Cdecl _FARFUNC getcwd( char _FAR *__buf, int __buflen );
  62. int         _Cdecl getdisk( void );
  63. int         _Cdecl mkdir( const char *__path );
  64. char _FAR * _Cdecl _FARFUNC mktemp( char _FAR *__template );
  65. int         _Cdecl rmdir( const char *__path );
  66. char _FAR * _CType _FARFUNC searchpath( const char _FAR *__file );
  67. int         _Cdecl setdisk( int __drive );
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71.  
  72. #endif  /* __DIR_H */
  73.  
  74.