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 
11 class RUDIMENTS_DLLSPEC directory {
12  public:
14  directory();
15 
17  ~directory();
18 
20  bool open(const char *path);
21 
23  bool close();
24 
28  bool skip();
29 
34  char *read();
35 
38  void rewind();
39 
42  uint64_t getChildCount();
43 
49  char *getChildName(uint64_t index);
50 
53  int64_t maxFileNameLength();
54 
57  int64_t maxPathLength();
58 
63  bool canExceedMaxFileNameLength();
64 
66  static bool create(const char *path, mode_t perms);
67 
69  static bool remove(const char *path);
70 
76  static char *getCurrentWorkingDirectory();
77 
79  static bool changeDirectory(const char *path);
80 
82  static bool changeRoot(const char *path);
83 
86  static int64_t maxFileNameLength(const char *pathname);
87 
91  static int64_t maxPathLength(const char *pathname);
92 
97  static bool canExceedMaxFileNameLength(
98  const char *pathname);
99 
100  #include <rudiments/private/directory.h>
101 };
102 
103 #endif
Definition: directory.h:11