Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
Directory enumerator. More...
#include <FXDir.h>
Public Types | |
enum | { MatchAll = 0, NoFiles = 1, NoDirs = 2, AllFiles = 4, AllDirs = 8, HiddenFiles = 16, HiddenDirs = 32, NoParent = 64, CaseFold = 128 } |
Options for listing files. More... | |
Public Member Functions | |
FXDir () | |
Construct directory enumerator. | |
FXDir (const FXString &path) | |
Construct directory enumerator open on path. | |
FXbool | open (const FXString &path) |
Open directory to path, return true if ok. | |
FXbool | isOpen () const |
Returns true if the directory is open. | |
FXbool | next (FXString &name) |
Go to next directory entry and return its name. | |
void | close () |
Close directory. | |
~FXDir () | |
Destructor. | |
Static Public Member Functions | |
static FXbool | create (const FXString &path, FXuint perm=FXIO::AllFull) |
Create directory. | |
static FXbool | remove (const FXString &path) |
Remove directory. | |
static FXint | listFiles (FXString *&filelist, const FXString &path, const FXString &pattern="*", FXuint flags=FXDir::MatchAll) |
List files in a given directory. More... | |
static FXint | listDrives (FXString *&drivelist) |
List drives, i.e. More... | |
static FXbool | createDirectories (const FXString &path, FXuint perm=FXIO::AllFull) |
Create a directories recursively. | |
Directory enumerator.
anonymous enum |
Options for listing files.
|
static |
List drives, i.e.
the roots of directory trees. On Windows, this returns an array of strings like {"C:\", "D:\", ..., ""}, while on Unix it will be just a two-element list like {"/", ""}. The last element will be always be set to the empty string. The list can be released by means of delete [] list. Returns the number of non-empty elements in the array.
|
static |
List files in a given directory.
Returns the number of files in the string-array list which matched the pattern or satisfied the flag conditions.
Copyright © 1997-2022 Jeroen van der Zijp |