directory.h
Go to the documentation of this file.
/***************************************************************************
$RCSfile$
-------------------
cvs : $Id$
begin : Tue Dec 03 2002
copyright : (C) 2002 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
* MA 02111-1307 USA *
* *
***************************************************************************/
#ifndef GWEN_DIRECTORY_H
#define GWEN_DIRECTORY_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct GWEN_DIRECTORY GWEN_DIRECTORY;
#ifdef __cplusplus
}
#endif
#include <gwenhywfar/gwenhywfarapi.h>
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/stringlist.h>
#ifdef __cplusplus
extern "C" {
#endif
#define GWEN_DIR_FLAGS_PUBLIC_PATH 0x00010000
#define GWEN_DIR_FLAGS_PUBLIC_NAME 0x00020000
GWENHYWFAR_API GWEN_DIRECTORY *GWEN_Directory_new(void);
GWENHYWFAR_API void GWEN_Directory_free(GWEN_DIRECTORY *d);
GWENHYWFAR_API
int GWEN_Directory_Open(GWEN_DIRECTORY *d, const char *n);
GWENHYWFAR_API int GWEN_Directory_Close(GWEN_DIRECTORY *d);
GWENHYWFAR_API int GWEN_Directory_Read(GWEN_DIRECTORY *d,
char *buffer,
unsigned int len);
GWENHYWFAR_API int GWEN_Directory_Rewind(GWEN_DIRECTORY *d);
GWENHYWFAR_API
int GWEN_Directory_GetHomeDirectory(char *buffer, unsigned int size);
GWENHYWFAR_API
int GWEN_Directory_GetTmpDirectory(char *buffer, unsigned int size);
GWENHYWFAR_API
int GWEN_Directory_GetPrefixDirectory(char *buffer, unsigned int size);
GWENHYWFAR_API
int GWEN_Directory_GetPath(const char *path, unsigned int flags);
GWENHYWFAR_API
int GWEN_Directory_Create(const char *path);
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
int GWEN_Directory_FindFileInPaths(const GWEN_STRINGLIST *paths,
const char *filePath,
GWEN_BUFFER *fbuf);
GWENHYWFAR_API
int GWEN_Directory_FindPathForFile(const GWEN_STRINGLIST *paths,
const char *filePath,
GWEN_BUFFER *fbuf);
GWENHYWFAR_API
int GWEN_Directory_GetAllEntries(const char *folder,
GWEN_STRINGLIST *sl,
const char *mask);
GWENHYWFAR_API
int GWEN_Directory_GetFileEntriesWithType(const char *folder,
GWEN_STRINGLIST *sl,
const char *mask);
GWENHYWFAR_API
int GWEN_Directory_GetFileEntries(const char *folder,
GWEN_STRINGLIST *sl,
const char *mask);
GWENHYWFAR_API
int GWEN_Directory_GetDirEntries(const char *folder,
GWEN_STRINGLIST *sl,
const char *mask);
GWENHYWFAR_API
int GWEN_Directory_GetMatchingFilesRecursively(const char *folder,
GWEN_STRINGLIST *sl,
const char *mask);
GWENHYWFAR_API
int GWEN_Directory_GetAbsoluteFolderPath(const char *folder, GWEN_BUFFER *tbuf);
/* defgroup */
#ifdef __cplusplus
}
#endif
#endif /* GWEN_DIRECTORY_H */
buffer.h
GWEN_Directory_GetFileEntriesWithType
GWENHYWFAR_API int GWEN_Directory_GetFileEntriesWithType(const char *folder, GWEN_STRINGLIST *sl, const char *mask)
GWEN_Directory_GetHomeDirectory
GWENHYWFAR_API int GWEN_Directory_GetHomeDirectory(char *buffer, unsigned int size)
GWEN_Directory_GetDirEntries
GWENHYWFAR_API int GWEN_Directory_GetDirEntries(const char *folder, GWEN_STRINGLIST *sl, const char *mask)
GWEN_Directory_CreatePublic
GWENHYWFAR_API int GWEN_Directory_CreatePublic(const char *path)
GWEN_Directory_OsifyPath
GWENHYWFAR_API int GWEN_Directory_OsifyPath(const char *path, GWEN_BUFFER *pbuf, int transformDriveElement)
GWEN_Directory_GetPrefixDirectory
GWENHYWFAR_API int GWEN_Directory_GetPrefixDirectory(char *buffer, unsigned int size)
GWEN_Directory_Read
GWENHYWFAR_API int GWEN_Directory_Read(GWEN_DIRECTORY *d, char *buffer, unsigned int len)
GWEN_DIRECTORY
struct GWEN_DIRECTORY GWEN_DIRECTORY
Definition directory.h:41
GWEN_Directory_GetAllEntries
GWENHYWFAR_API int GWEN_Directory_GetAllEntries(const char *folder, GWEN_STRINGLIST *sl, const char *mask)
GWEN_Directory_Open
GWENHYWFAR_API int GWEN_Directory_Open(GWEN_DIRECTORY *d, const char *n)
GWEN_Directory_GetMatchingFilesRecursively
GWENHYWFAR_API int GWEN_Directory_GetMatchingFilesRecursively(const char *folder, GWEN_STRINGLIST *sl, const char *mask)
GWEN_Directory_new
GWENHYWFAR_API GWEN_DIRECTORY * GWEN_Directory_new(void)
GWEN_Directory_FindFileInPaths
GWENHYWFAR_API int GWEN_Directory_FindFileInPaths(const GWEN_STRINGLIST *paths, const char *filePath, GWEN_BUFFER *fbuf)
GWEN_Directory_free
GWENHYWFAR_API void GWEN_Directory_free(GWEN_DIRECTORY *d)
GWEN_Directory_FindPathForFile
GWENHYWFAR_API int GWEN_Directory_FindPathForFile(const GWEN_STRINGLIST *paths, const char *filePath, GWEN_BUFFER *fbuf)
GWEN_Directory_Close
GWENHYWFAR_API int GWEN_Directory_Close(GWEN_DIRECTORY *d)
GWEN_Directory_Create
GWENHYWFAR_API int GWEN_Directory_Create(const char *path)
GWEN_Directory_GetFileEntries
GWENHYWFAR_API int GWEN_Directory_GetFileEntries(const char *folder, GWEN_STRINGLIST *sl, const char *mask)
GWEN_Directory_GetAbsoluteFolderPath
GWENHYWFAR_API int GWEN_Directory_GetAbsoluteFolderPath(const char *folder, GWEN_BUFFER *tbuf)
GWEN_Directory_Rewind
GWENHYWFAR_API int GWEN_Directory_Rewind(GWEN_DIRECTORY *d)
GWEN_Directory_GetPath
GWENHYWFAR_API int GWEN_Directory_GetPath(const char *path, unsigned int flags)
GWEN_Directory_GetTmpDirectory
GWENHYWFAR_API int GWEN_Directory_GetTmpDirectory(char *buffer, unsigned int size)
GWEN_BUFFER
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
Definition buffer.h:38
gwenhywfarapi.h
GWENHYWFAR_API
#define GWENHYWFAR_API
Definition gwenhywfarapi.h:67
stringlist.h
GWEN_STRINGLIST
struct GWEN_STRINGLISTSTRUCT GWEN_STRINGLIST
Definition stringlist.h:56