Rudiments
directory.h
1 // Copyright (c) 2004 David Muse
2 // See the COPYING file for more information.
3 
4 #ifndef RUDIMENTS_DIRECTORY_H
5 #define RUDIMENTS_DIRECTORY_H
6 
7 #include <rudiments/private/directoryincludes.h>
8 
9 class directoryprivate;
10 
13 class RUDIMENTS_DLLSPEC directory {
14  public:
16  directory();
17 
19  ~directory();
20 
22  bool open(const char *path);
23 
25  bool close();
26 
30  bool skip();
31 
36  char *read();
37 
40  void rewind();
41 
44  uint64_t getChildCount();
45 
51  char *getChildName(uint64_t index);
52 
55  int64_t maxFileNameLength();
56 
60  int64_t maxPathLength();
61 
66  bool canAccessLongFileNames();
67 
69  static bool create(const char *path, mode_t perms);
70 
72  static bool remove(const char *path);
73 
79  static char *getCurrentWorkingDirectory();
80 
82  static bool changeDirectory(const char *path);
83 
85  static bool changeRoot(const char *path);
86 
89  static int64_t maxFileNameLength(const char *pathname);
90 
94  static int64_t maxPathLength(const char *pathname);
95 
100  static bool canAccessLongFileNames(const char *pathname);
101 
105  static bool needsMutex();
106 
110  static void setMutex(threadmutex *mtx);
111 
112  #include <rudiments/private/directory.h>
113 };
114 
115 #endif