Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXDir Class Reference

Directory enumerator. More...

#include <FXDir.h>

List of all members.

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.
static FXint listDrives (FXString *&drivelist)
 List drives, i.e.
static FXbool createDirectories (const FXString &path, FXuint perm=FXIO::AllFull)
 Create a directories recursively.

Detailed Description

Directory enumerator.


Member Enumeration Documentation

anonymous enum

Options for listing files.

Enumerator:
NoFiles 

Only files and directories matching pattern.

NoDirs 

Don't list any files.

AllFiles 

Don't list any directories.

AllDirs 

List all files.

HiddenFiles 

List all directories.

HiddenDirs 

List hidden files also.

NoParent 

List hidden directories also.

CaseFold 

Don't include '.' and '..' in the listing.


Member Function Documentation

static FXint FX::FXDir::listDrives ( FXString *&  drivelist)
static

List drives, i.e.

roots of directory trees. Return the number of drives in the string array.

static FXint FX::FXDir::listFiles ( FXString *&  filelist,
const FXString path,
const FXString pattern = "*",
FXuint  flags = FXDir::MatchAll 
)
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.


The documentation for this class was generated from the following file:

Copyright © 1997-2016 Jeroen van der Zijp