Qore Programming Language Reference Manual 0.8.8

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

All Classes Namespaces Functions Variables Groups Pages
QC_Dir.dox.h
1 namespace Qore {
4
13 class Dir {
14
15 public:
17
32 bool chdir(string path);
33
34 public:
36
57 nothing chgrp(int gid);
58
59 public:
61
83 nothing chgrp(string groupname);
84
85 public:
87
105 nothing chmod(softint mode);
106
107 public:
109
130 nothing chown(int uid);
131
132 public:
134
156 nothing chown(string username);
157
158 public:
160
169 constructor(*string encoding);
170
171 public:
173
178 copy();
179
180 public:
182
204 int create(softint mode = 0777);
205
206 public:
208
216 bool exists();
217
218 public:
220
240 hash hstat();
241
242 public:
244
266 list list(bool full = False);
267
268 public:
270
298 list list(string regex, softint regex_options = 0, softbool full = False);
299
300 public:
302
326 list listDirs(bool full = False);
327
328 public:
330
358 list listDirs(string regex, softint regex_options = 0, softbool full = False);
359
360 public:
362
387 list listFiles(bool full = False);
388
389 public:
391
419 list listFiles(string regex, softint regex_options = 0, softbool full = False);
420
421 public:
423
442 nothing mkdir(string subdir, softint mode = 0777);
443
444 public:
446
458 Dir openDir(string subdir, *string encoding);
459
460 public:
462
479 File openFile(string filename, int flags = O_RDONLY, int mode = 0666, *string encoding);
480
481 public:
483
492 *string path();
493
494 public:
496
518 bool removeFile(string file);
519
520 public:
522
540 nothing rmdir(string subdir);
541
542 public:
544
564 list stat();
565
566 public:
568
589 hash statvfs();
590 };
591 };
Qore::Dir::listDirs
list listDirs(bool full=False)
Retrieves all subdirectory entries in this directory, except &quot;.&quot; and &quot;..&quot; directories; if any errors ...
Qore::Dir::rmdir
nothing rmdir(string subdir)
Removes a direct subdirectory from the Dir object&#39;s current path.
Qore::Dir
This class implements directory handling, file listing, creating/removing subdirectories, etc.
Definition: QC_Dir.dox.h:13
Qore::Dir::constructor
constructor(*string encoding)
Creates the Directory object.
Qore::Dir::create
int create(softint mode=0777)
Creates the directory tree the Dir object points to, if it does not exist.
Qore::Dir::statvfs
hash statvfs()
Returns a hash of filesystem status values for the current directory.
Qore::Dir::path
*string path()
Returns the path of the Dir object or NOTHING if no path is set.
Qore::Dir::removeFile
bool removeFile(string file)
Remove the file with the given name in the Dir object&#39;s directory.
Qore::False
const False
logical False
Definition: qc_qore.dox.h:92
Qore::Dir::mkdir
nothing mkdir(string subdir, softint mode=0777)
Creates a direct subdirectory in the Dir object&#39;s current path.
Qore::regex
bool regex(string str, string regex, int options=0)
Returns True if the regular expression matches the string passed, otherwise returns False...
Qore::Dir::exists
bool exists()
Returns True if the path in the Dir object points to a directory that already exists and is openable ...
Qore::Dir::openFile
File openFile(string filename, int flags=O_RDONLY, int mode=0666, *string encoding)
Create and open a File object in the current directory of the Dir object.
Qore::Dir::chmod
nothing chmod(softint mode)
Changes the mode of the directory.
Qore::Dir::copy
copy()
Creates a new directory object with the same character encoding specification and the same path as th...
Qore::Dir::chown
nothing chown(int uid)
Change the ownership of the directory from the userid.
Qore::Dir::listFiles
list listFiles(bool full=False)
Retrieves all files in this directory; if any errors occur an exception is thrown.
Qore::Dir::hstat
hash hstat()
Returns a hash of file status information for the current directory.
Qore::Dir::list
list list(bool full=False)
Get all entries in this directory, except &quot;.&quot; and &quot;..&quot; directories; if any errors occur an exception ...
Qore::O_RDONLY
const O_RDONLY
Open the file read-only.
Definition: QC_File.dox.h:875
Qore::File
The File class allows Qore programs to read, write, and create files.
Definition: QC_File.dox.h:50
Qore::Dir::chgrp
nothing chgrp(int gid)
Change the group membership of the directory from the group id.
Qore::Dir::stat
list stat()
Returns a list of file status information for the current directory.
Qore::Dir::chdir
bool chdir(string path)
Changes the current directory of the Dir object to the path given.
Qore::hash
hash hash(object obj)
Returns a hash of an object&#39;s members.
Qore::Dir::openDir
Dir openDir(string subdir, *string encoding)
Get a Dir object as an subdir entry of the current directory.