class PDirectory |
Class to represent a directory in the operating system file system.
![]() | Construction |
![]() | Access functions |
![]() | File system functions |
![]() | Directory listing functions |
![]() | scanMask Mask of file types that the directory scan will return |
Overrides from class PObject
Overrides from class PContainer
Size/Length functions
Concatenation operators *
Comparison operators
Search & replace functions
Sub-string functions
Conversion functions
New functions for class
Common functions for containers
Run Time Type functions
I/O functions
Comparison functions
Class to represent a directory in the operating system file system. A directory is a special file that contains a list of file paths.The directory paths are highly platform dependent and a minimum number of assumptions should be made.
The PDirectory object is a string consisting of a possible volume name, and a series directory names in the path from the volumes root to the directory that the object represents. Each directory is separated by the platform dependent separator character which is defined by the PDIR_SEPARATOR macro. The path always has a trailing separator.
Some platforms allow more than one character to act as a directory separator so when doing any processing the IsSeparator() function should be used to determine if a character is a possible separator.
The directory may be opened to gain access to the list of files that it contains. Note that the directory does not contain the "." and ".." entries that some platforms support.
The ancestor class is dependent on the platform. For file systems that are case sensitive, eg Unix, the ancestor is PString. For other platforms, the ancestor class is PCaselessString.
This is platform dependent, for example for MS-DOS it is the 11 character volume name for the drive, eg "DOS_DISK", and for Macintosh it is the disks volume name eg "Untitled". For a unix platform it is the device name for the file system eg "/dev/sda1".
Note that the free space will be the physical limit and if user quotas are in force by the operating system, the use may not actually be able to use all of these bytes.
Only files that are of a type that is specified in the mask will be returned.
Note that the directory scan will not return the "." and ".." entries that some platforms support.
Only files that are of a type that is specified in the mask will be returned.
Note that the directory scan will not return the "." and ".." entries that some platforms support.
Only files that are of a type that is specified in the mask passed to the Open() or Restart() functions will be returned.
Note that the directory scan will not return the "." and ".." entries that some platforms support.
To get a full path name concatenate the PDirectory object itself with the entry name.
Note that the directory scan will not return the "." and ".." entries that some platforms support.
Note that the directory scan will not return the "." and ".." entries that some platforms support.
Alphabetic index HTML hierarchy of classes or Java