4 * Functions for working with directories and path names.
6 * This file is part of the Mingw32 package.
9 * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
23 * $Date: 2002/11/24 18:09:56 $
27 #ifndef __STRICT_ANSI__
32 #include <crtdll/stdio.h> /* To get FILENAME_MAX... ugly. */
33 #include <crtdll/sys/types.h> /* To get time_t. */
40 * Attributes of files as returned by _findfirst et al.
42 #define _A_NORMAL 0x00000000
43 #define _A_RDONLY 0x00000001
44 #define _A_HIDDEN 0x00000002
45 #define _A_SYSTEM 0x00000004
46 #define _A_VOLID 0x00000008
47 #define _A_SUBDIR 0x00000010
48 #define _A_ARCH 0x00000020
50 #ifndef _FSIZE_T_DEFINED
51 typedef unsigned long _fsize_t
;
52 #define _FSIZE_T_DEFINED
56 * The following structure is filled in by _findfirst or _findnext when
57 * they succeed in finding a match.
61 unsigned attrib
; /* Attributes, see constants above. */
63 time_t time_access
; /* always midnight local time */
66 char name
[FILENAME_MAX
]; /* may include spaces. */
70 * Functions for searching for files. _findfirst returns -1 if no match
71 * is found. Otherwise it returns a handle to be used in _findnext and
72 * _findclose calls. _findnext also returns -1 if no match could be found,
73 * and 0 if a match was found. Call _findclose when you are finished.
75 int _findclose (int nHandle
);
76 int _findfirst (const char* szFilespec
, struct _finddata_t
* find
);
77 int _findnext (int nHandle
, struct _finddata_t
* find
);
79 int _chdir (const char* szPath
);
80 char* _getcwd (char* caBuffer
, int nBufferSize
);
81 int _mkdir (const char* szPath
);
82 char* _mktemp (char* szTemplate
);
83 int _rmdir (const char* szPath
);
88 int chdir (const char* szPath
);
89 char* getcwd (char* caBuffer
, int nBufferSize
);
90 int mkdir (const char* szPath
);
91 char* mktemp (char* szTemplate
);
92 int rmdir (const char* szPath
);
94 #endif /* Not _NO_OLDNAMES */
101 #endif /* Not _DIR_H_ */
103 #endif /* Not __STRICT_ANSI__ */