Rudiments
directory.h
1 // Copyright (c) 1999-2018 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:
15 
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 
58  int64_t maxPathLength();
59 
65 
67  static bool create(const char *path, mode_t perms);
68 
79  char *templatedirname, mode_t perms);
80 
82  static bool remove(const char *path);
83 
85  static bool removeTree(const char *path);
86 
93 
95  static bool changeDirectory(const char *path);
96 
98  static bool changeRoot(const char *path);
99 
102  static int64_t maxFileNameLength(const char *pathname);
103 
106  static int64_t maxPathLength(const char *pathname);
107 
113  const char *pathname);
114 
115  #include <rudiments/private/directory.h>
116 };
117 
118 #endif
Definition: directory.h:11
bool close()
static bool changeDirectory(const char *path)
static bool canExceedMaxFileNameLength(const char *pathname)
static int64_t maxPathLength(const char *pathname)
static bool changeRoot(const char *path)
static bool removeTree(const char *path)
bool skip()
void rewind()
char * read()
uint64_t getChildCount()
int64_t maxFileNameLength()
int64_t maxPathLength()
static bool remove(const char *path)
bool open(const char *path)
bool canExceedMaxFileNameLength()
static bool createTemporaryDirectory(char *templatedirname, mode_t perms)
static bool create(const char *path, mode_t perms)
static int64_t maxFileNameLength(const char *pathname)
static char * getCurrentWorkingDirectory()
char * getChildName(uint64_t index)