Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

directory.h

Go to the documentation of this file.
00001 
00023 #ifndef _LIBCOMPREX_DIRECTORY_H_
00024 #define _LIBCOMPREX_DIRECTORY_H_
00025 
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029 
00030 typedef struct _CxFsNode        CxDirectory;     
00031 typedef struct _CxDirectoryData CxDirectoryData; 
00033 #include <libcomprex/fsnode.h>
00034 #include <libcomprex/file.h>
00035 
00039 struct _CxDirectoryData
00040 {
00041     char *physPath;           
00043     CxFsNode *children;       
00044     CxFsNode *lastChild;      
00046     unsigned int subdirCount; 
00047     unsigned int fileCount;   
00048 };
00049 
00050 /**************************************************************************/
00052 /**************************************************************************/
00064 CxDirectory *cxNewDirectory(void);
00065 
00073 void cxDestroyDirectory(CxDirectory *dir);
00074 
00077 /**************************************************************************/
00079 /**************************************************************************/
00092 void cxSetDirArchive(CxDirectory *dir, CxArchive *archive);
00093 
00102 void cxSetDirParent(CxDirectory *dir, CxDirectory *parent);
00103 
00112 void cxSetDirName(CxDirectory *dir, const char *name);
00113 
00124 void cxSetDirPhysicalPath(CxDirectory *dir, const char *path);
00125 
00134 void cxSetDirMode(CxDirectory *dir, mode_t mode);
00135 
00144 void cxSetDirGid(CxDirectory *dir, gid_t gid);
00145 
00154 void cxSetDirUid(CxDirectory *dir, uid_t uid);
00155 
00164 void cxSetDirDate(CxDirectory *dir, time_t date);
00165 
00177 void cxSetDirLocal(CxDirectory *dir, char isLocal);
00178 
00181 /**************************************************************************/
00183 /**************************************************************************/
00195 CxArchive *cxGetDirArchive(CxDirectory *dir);
00196 
00206 CxDirectory *cxGetDirParent(CxDirectory *dir);
00207 
00217 const char *cxGetDirName(CxDirectory *dir);
00218 
00228 const char *cxGetDirPath(CxDirectory *dir);
00229 
00239 unsigned int cxGetFileCount(CxDirectory *dir);
00240 
00254 const char *cxGetDirPhysicalPath(CxDirectory *dir);
00255 
00265 mode_t cxGetDirMode(CxDirectory *dir);
00266 
00276 uid_t cxGetDirUid(CxDirectory *dir);
00277 
00287 gid_t cxGetDirGid(CxDirectory *dir);
00288 
00298 time_t cxGetDirDate(CxDirectory *dir);
00299 
00312 char cxIsDirLocal(CxDirectory *dir);
00313 
00323 unsigned int cxGetSubDirCount(CxDirectory *dir);
00324 
00327 /**************************************************************************/
00329 /**************************************************************************/
00342 CxDirectory *cxGetDirectory(CxDirectory *base, const char *path);
00343 
00354 CxFile *cxGetFile(CxDirectory *base, const char *path);
00355 
00358 /**************************************************************************/
00360 /**************************************************************************/
00374 CxDirectory *cxMkDir(CxDirectory *base, const char *path);
00375 
00394 void cxDirAddFile(CxDirectory *dir, CxFile *file);
00395 
00414 void cxDirAddSubDir(CxDirectory *dir, CxDirectory *subdir);
00415 
00430 void cxDirRemoveFile(CxDirectory *dir, CxFile *file);
00431 
00446 void cxDirRemoveSubDir(CxDirectory *dir, CxDirectory *subdir);
00447 
00450 /**************************************************************************/
00452 /**************************************************************************/
00466 CxFile *cxGetFirstFile(CxDirectory *dir);
00467 
00479 CxDirectory *cxGetFirstSubDir(CxDirectory *dir);
00480 
00491 CxDirectory *cxGetPreviousDir(CxDirectory *dir);
00492 
00503 CxDirectory *cxGetNextDir(CxDirectory *dir);
00504 
00507 #ifdef __cplusplus
00508 }
00509 #endif
00510 
00511 #endif /* _LIBCOMPREX_DIRECTORY_H_ */
00512 

Generated on Wed Mar 5 20:47:43 2003 for libcomprex by doxygen1.2.18-20021020