35 #ifndef PTLIB_DIRECTORY_H
36 #define PTLIB_DIRECTORY_H
47 #define PDIR_SEPARATOR '\\'
51 #define PDIR_SEPARATOR '/'
52 #define P_MAX_PATH (_POSIX_PATH_MAX)
197 const char * cpathname
217 const char * cpathname
413 virtual void Close();
465 #include "msos/ptlib/pdirect.h"
467 #include "unix/ptlib/pdirect.h"
473 #endif // PTLIB_DIRECTORY_H
PBoolean Change() const
Change the current working directory to the objects location.
FileTypes type
File type for this file. Only one bit is set at a time here.
Definition: pdirect.h:94
virtual void Close()
Close the directory during or after a file list scan.
Owner read & write plus group and world read permissions.
Definition: pdirect.h:137
void Destruct()
Internal function called from container destructors.
File has owner read permission.
Definition: pdirect.h:133
File has world read permission.
Definition: pdirect.h:121
PDirectory & operator=(const PString &pathname)
Set the directory to the specified path.
PBoolean Next()
Move to the next file in the directory scan.
PBoolean Exists() const
Test for if the directory exists.
int scanMask
Mask of file types that the directory scan will return.
Definition: pdirect.h:461
PBoolean hidden
File is a hidden file.
Definition: pdirect.h:154
This class defines an absolute time and date.
Definition: ptime.h:53
File has owner write permission.
Definition: pdirect.h:131
PTime accessed
Time of last access to the file.
Definition: pdirect.h:107
#define PINLINE
Definition: object.h:127
virtual PFilePathString GetEntryName() const
Get the name (without the volume or directory path) of the current entry in the directory scan...
void Destruct()
Definition: pdirect.h:456
Mask for all file types.
Definition: pdirect.h:90
This class is a variation of a string that ignores case.
Definition: pstring.h:1708
Owner read & write & execute plus group and world read & exectute permissions.
Definition: pdirect.h:139
FileTypes
All types that a particular file path may be.
Definition: pdirect.h:72
File path is a fifo (pipe) device.
Definition: pdirect.h:84
File has group execute permission.
Definition: pdirect.h:123
virtual PBoolean IsSubDir() const
Determine if the directory entry currently being scanned is itself another directory entry...
This is an array collection class of PString objects.
Definition: pstring.h:2024
PDirectory GetParent() const
Get the directory for the parent to the current directory.
PBoolean GetVolumeSpace(PInt64 &total, PInt64 &free, DWORD &clusterSize) const
Determine the total number of bytes and number of bytes free on the volume that this directory is con...
#define P_MAX_PATH
Definition: pdirect.h:52
virtual PBoolean Open(int scanMask=PFileInfo::AllFiles)
Open the directory for scanning its list of files.
BOOL PBoolean
Definition: object.h:102
Class to represent a directory in the operating system file system.
Definition: pdirect.h:182
All possible permissions.
Definition: pdirect.h:135
Permissions
File access permissions for the file.
Definition: pdirect.h:115
PTime modified
Time of last modifiaction of the file.
Definition: pdirect.h:102
File has world write permission.
Definition: pdirect.h:119
virtual PBoolean Restart(int scanMask=PFileInfo::AllFiles)
Restart file list scan from the beginning of directory.
#define free(p)
Override of system call for memory check system.
Definition: object.h:864
PTime created
Time of file creation of the file.
Definition: pdirect.h:99
File path is of an unknown type.
Definition: pdirect.h:88
PString PFilePathString
Definition: pdirect.h:53
File has group write permission.
Definition: pdirect.h:125
virtual PBoolean GetInfo(PFileInfo &info) const
Get file information on the current directory entry.
File path is a sub-directory.
Definition: pdirect.h:78
The character string class.
Definition: pstring.h:108
PDirectory GetRoot() const
Get the root directory of a volume.
Base string type for a file path.
Definition: filepath.h:48
File has world execute permission.
Definition: pdirect.h:117
PBoolean Remove()
Delete the directory.
File has owner execute permission.
Definition: pdirect.h:129
File has group read permission.
Definition: pdirect.h:127
int permissions
A bit mask of all the file acces permissions.
Definition: pdirect.h:148
PBoolean IsRoot() const
Determine if the directory is the root directory of a volume.
static PINLINE PBoolean IsSeparator(char ch)
Determine if the character ch is a directory path separator.
PUInt64 size
Size of the file in bytes.
Definition: pdirect.h:112
PStringArray GetPath() const
Get the directory path as an array of strings.
File path is a symbolic link.
Definition: pdirect.h:76
PDirectory()
Create a directory object of the current working directory.
PBoolean Create(int perm=PFileInfo::DefaultDirPerms) const
Create a new directory with the specified permissions.
File path is a block device name.
Definition: pdirect.h:82
File path is a character device name.
Definition: pdirect.h:80
Class containing the system information on a file path.
Definition: pdirect.h:63
PFilePathString GetVolume() const
Get the volume name that the directory is in.
Ultimate parent class for all objects in the class library.
Definition: object.h:1118
File path is a socket device.
Definition: pdirect.h:86
Ordinary disk file.
Definition: pdirect.h:74