Rudiments
/home/dmuse/src/rudiments/include/rudiments/directory.h
00001 // Copyright (c) 2004 David Muse
00002 // See the COPYING file for more information.
00003 
00004 #ifndef RUDIMENTS_DIRECTORY_H
00005 #define RUDIMENTS_DIRECTORY_H
00006 
00007 #include <rudiments/private/directoryincludes.h>
00008 
00009 #ifdef RUDIMENTS_NAMESPACE
00010 namespace rudiments {
00011 #endif
00012 
00013 class directoryprivate;
00014 
00017 class RUDIMENTS_DLLSPEC directory {
00018         public:
00020                 directory();
00021 
00023                 ~directory();
00024 
00026                 bool    open(const char *path);
00027 
00029                 bool    close();
00030 
00033                 void    rewind();
00034 
00037                 uint64_t        getChildCount();
00038 
00044                 char    *getChildName(uint64_t index);
00045 
00048                 int64_t maxFileNameLength();
00049 
00053                 int64_t maxPathLength();
00054 
00059                 bool    canAccessLongFileNames();
00060 
00062                 static bool     create(const char *path, mode_t perms);
00063 
00065                 static bool     remove(const char *path);
00066 
00072                 static char     *getCurrentWorkingDirectory();
00073 
00075                 static bool     changeDirectory(const char *path);
00076 
00078                 static bool     changeRoot(const char *path);
00079 
00082                 static int64_t  maxFileNameLength(const char *pathname);
00083 
00087                 static int64_t  maxPathLength(const char *pathname);
00088 
00093                 static bool     canAccessLongFileNames(const char *pathname);
00094 
00098                 static bool     needsMutex();
00099 
00103                 static void     setMutex(mutex *mtx);
00104 
00105         #include <rudiments/private/directory.h>
00106 };
00107 
00108 #ifdef RUDIMENTS_NAMESPACE
00109 }
00110 #endif
00111 
00112 #endif