gwenhywfar  5.11.1beta
directory.h
Go to the documentation of this file.
1 /***************************************************************************
2  $RCSfile$
3  -------------------
4  cvs : $Id$
5  begin : Tue Dec 03 2002
6  copyright : (C) 2002 by Martin Preuss
7  email : martin@libchipcard.de
8 
9  ***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2.1 of the License, or (at your option) any later version. *
15  * *
16  * This library is distributed in the hope that it will be useful, *
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
19  * Lesser General Public License for more details. *
20  * *
21  * You should have received a copy of the GNU Lesser General Public *
22  * License along with this library; if not, write to the Free Software *
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
24  * MA 02111-1307 USA *
25  * *
26  ***************************************************************************/
27 
34 #ifndef GWEN_DIRECTORY_H
35 #define GWEN_DIRECTORY_H
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 typedef struct GWEN_DIRECTORY GWEN_DIRECTORY;
42 
43 #ifdef __cplusplus
44 }
45 #endif
46 
47 
49 #include <gwenhywfar/buffer.h>
50 #include <gwenhywfar/stringlist.h>
51 
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
60 #define GWEN_DIR_FLAGS_PUBLIC_PATH 0x00010000
61 #define GWEN_DIR_FLAGS_PUBLIC_NAME 0x00020000
73 
78 
83 
93 int GWEN_Directory_Open(GWEN_DIRECTORY *d, const char *n);
94 
103 
116  char *buffer,
117  unsigned int len);
118 
128 
129 
154 int GWEN_Directory_GetHomeDirectory(char *buffer, unsigned int size);
155 
168 int GWEN_Directory_GetTmpDirectory(char *buffer, unsigned int size);
169 
180 int GWEN_Directory_GetPrefixDirectory(char *buffer, unsigned int size);
181 
182 
191 int GWEN_Directory_GetPath(const char *path, unsigned int flags);
192 
193 
198 int GWEN_Directory_Create(const char *path);
199 
205 int GWEN_Directory_CreatePublic(const char *path);
206 
221 int GWEN_Directory_OsifyPath(const char *path, GWEN_BUFFER *pbuf,
222  int transformDriveElement);
223 
224 
227  const char *filePath,
228  GWEN_BUFFER *fbuf);
229 
232  const char *filePath,
233  GWEN_BUFFER *fbuf);
234 
247 int GWEN_Directory_GetAllEntries(const char *folder,
248  GWEN_STRINGLIST *sl,
249  const char *mask);
250 
268  GWEN_STRINGLIST *sl,
269  const char *mask);
270 
280 int GWEN_Directory_GetFileEntries(const char *folder,
281  GWEN_STRINGLIST *sl,
282  const char *mask);
283 
284 
294 int GWEN_Directory_GetDirEntries(const char *folder,
295  GWEN_STRINGLIST *sl,
296  const char *mask);
297 
298 
310  GWEN_STRINGLIST *sl,
311  const char *mask);
312 
313 
324 int GWEN_Directory_GetAbsoluteFolderPath(const char *folder, GWEN_BUFFER *tbuf);
325  /* defgroup */
327 
328 
329 #ifdef __cplusplus
330 }
331 #endif
332 
333 
334 #endif /* GWEN_DIRECTORY_H */
335 
336 
337 
338 
GWENHYWFAR_API int GWEN_Directory_GetFileEntriesWithType(const char *folder, GWEN_STRINGLIST *sl, const char *mask)
GWENHYWFAR_API int GWEN_Directory_GetHomeDirectory(char *buffer, unsigned int size)
GWENHYWFAR_API int GWEN_Directory_GetDirEntries(const char *folder, GWEN_STRINGLIST *sl, const char *mask)
GWENHYWFAR_API int GWEN_Directory_CreatePublic(const char *path)
GWENHYWFAR_API int GWEN_Directory_OsifyPath(const char *path, GWEN_BUFFER *pbuf, int transformDriveElement)
GWENHYWFAR_API GWEN_DIRECTORY * GWEN_Directory_new(void)
GWENHYWFAR_API int GWEN_Directory_GetPrefixDirectory(char *buffer, unsigned int size)
GWENHYWFAR_API int GWEN_Directory_Read(GWEN_DIRECTORY *d, char *buffer, unsigned int len)
struct GWEN_DIRECTORY GWEN_DIRECTORY
Definition: directory.h:41
GWENHYWFAR_API int GWEN_Directory_GetAllEntries(const char *folder, GWEN_STRINGLIST *sl, const char *mask)
GWENHYWFAR_API int GWEN_Directory_Open(GWEN_DIRECTORY *d, const char *n)
GWENHYWFAR_API int GWEN_Directory_GetMatchingFilesRecursively(const char *folder, GWEN_STRINGLIST *sl, const char *mask)
GWENHYWFAR_API int GWEN_Directory_FindFileInPaths(const GWEN_STRINGLIST *paths, const char *filePath, GWEN_BUFFER *fbuf)
GWENHYWFAR_API void GWEN_Directory_free(GWEN_DIRECTORY *d)
GWENHYWFAR_API int GWEN_Directory_FindPathForFile(const GWEN_STRINGLIST *paths, const char *filePath, GWEN_BUFFER *fbuf)
GWENHYWFAR_API int GWEN_Directory_Close(GWEN_DIRECTORY *d)
GWENHYWFAR_API int GWEN_Directory_Create(const char *path)
GWENHYWFAR_API int GWEN_Directory_GetFileEntries(const char *folder, GWEN_STRINGLIST *sl, const char *mask)
GWENHYWFAR_API int GWEN_Directory_GetAbsoluteFolderPath(const char *folder, GWEN_BUFFER *tbuf)
GWENHYWFAR_API int GWEN_Directory_Rewind(GWEN_DIRECTORY *d)
GWENHYWFAR_API int GWEN_Directory_GetPath(const char *path, unsigned int flags)
GWENHYWFAR_API int GWEN_Directory_GetTmpDirectory(char *buffer, unsigned int size)
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
Definition: buffer.h:38
#define GWENHYWFAR_API
Definition: gwenhywfarapi.h:67
struct GWEN_STRINGLISTSTRUCT GWEN_STRINGLIST
Definition: stringlist.h:56