30 #ifndef PTLIB_FILEPATH_H
31 #define PTLIB_FILEPATH_H
118 const char * suffix = NULL
299 char substitute =
'_'
318 #include "msos/ptlib/filepath.h"
320 #include "unix/ptlib/filepath.h"
325 #endif // PTLIB_FILEPATH_H
static PFilePathString Sanitise(const PString &str, const PString &extra=PString::Empty(), char substitute= '_')
Sanitise the string to be a legal filename.
PFilePathString GetFileName() const
Get the actual directory entry name component of the full file specification.
PFilePathString GetTitle() const
Get the title component of the full file path description, eg for the DOS file "C:\SRC\PWLIB\FRED.DAT" this would be "FRED".
This class describes a full description for a file on the particular platform.
Definition: filepath.h:61
PFilePathString GetVolume() const
Get the drive/volume name component of the full file path description.
PFilePath & operator=(const PFilePath &path)
Change the file path description to the specified file name.
PDirectory GetDirectory() const
Get the the directory that the file is contained in.
PFilePath & operator+=(const PString &str)
Concatenate a string to the file path, modifiying that path.
Class to represent a directory in the operating system file system.
Definition: pdirect.h:173
PFilePath()
Create an empty file path description.
void SetType(const PFilePathString &type)
Set the type component of the full file path description, eg for the DOS file "C:\SRC\PWLIB\FRED.DAT" would become "C:\SRC\PWLIB\FRED.TXT".
static PFilePathString Canonicalise(const PFilePathString &path, bool isDirectory)
The character string class.
Definition: pstring.h:108
static bool IsValid(char c)
Test if the character is valid in a filename.
Base string type for a file path.
Definition: filepath.h:44
virtual void AssignContents(const PContainer &cont)
Copy the container contents.
Abstract class to embody the base functionality of a container.
Definition: contain.h:99
PFilePathString GetType() const
Get the file type of the file.
static const PString & Empty()
Return an empty string.
static bool IsAbsolutePath(const PString &path)
Test if path is an absolute path or relative path.
PFilePathString GetPath() const
Get the directory path component of the full file path description.