#include <CeylanLibfatDirectory.h>
Public Types | |
enum | TextOutputFormat { rawText, html } |
Defines what text output formats for TextDisplayable instances are available. More... | |
Public Member Functions | |
virtual | ~LibfatDirectory () throw () |
Destroys the directory reference, not the directory itself. | |
virtual bool | hasDirectory (const std::string &subdirectoryName) const |
Tells whether the directory has a direct subdirectory named subdirectoryName. | |
virtual bool | hasFile (const std::string &fileName) const |
Tells whether the directory has a direct file or symbolic link named fileName. | |
virtual bool | hasEntry (const std::string &entryName) const |
Tells whether the directory has a direct entry named entryName, whatever the entry is (file, directory, named FIFO, socket, etc. | |
virtual void | getSubdirectories (std::list< std::string > &subDirectories) const |
Returns the names of all direct subdirectories of this directory, in the specified list. | |
virtual void | getFiles (std::list< std::string > &files) const |
Returns the names of all regular files and symbolic links of this directory, in the specified list. | |
virtual void | getEntries (std::list< std::string > &entries) const |
Returns the names of all direct entries of any type of this directory (including files and directories), in the specified list. | |
virtual void | getSortedEntries (std::list< std::string > &subDirectories, std::list< std::string > &files, std::list< std::string > &otherEntries) const |
Returns the names of all direct entries of any type of this directory (including files and directories), in the corresponding specified list. | |
virtual const std::string | toString (Ceylan::VerbosityLevels level=Ceylan::high) const |
Returns a user-friendly description of the state of this object. | |
LibfatDirectory (const std::string &directoryName="", bool create=true) | |
Creates a LibfatDirectory reference on a directory either already existing, or to be created on disk thanks to the operating system facilities. | |
virtual void | goDown (const std::string &subdirectoryName) |
virtual bool | isValid () const |
Tells whether the reference on the directory is valid. | |
virtual const std::string & | getPath () const |
Returns the path of the directory which is referred to. | |
virtual void | removeLeadingSeparator () |
Removes the leading separator, if any, in the path of this directory path. | |
Static Public Member Functions | |
static LibfatDirectory & | Create (const std::string &newDirectoryName) |
Returns a LibfatDirectory reference on a directory newly created on disk, thanks to the operating system facilities. | |
static LibfatDirectory & | Open (const std::string &directoryName="") |
Returns a LibfatDirectory reference on specified already-existing directory, which will be "opened" (i.e. | |
static bool | Exists (const std::string &directoryPath) |
Tells whether the directory directoryPath exists and is a directory indeed. | |
static void | Remove (const std::string &directoryPath, bool recursive=false) |
Removes the directory from disk. | |
static void | Move (const std::string &sourceDirectoryname, const std::string &targetDirectoryname) |
Moves specified directory on filesystem. | |
static void | Copy (const std::string &sourceDirectoryname, const std::string &targetDirectoryname) |
Copies the directory on filesystem. | |
static time_t | GetLastChangeTime (const std::string &directoryPath) |
Returns the last change time of the specified directory. | |
static bool | IsAValidDirectoryPath (const std::string &directoryString) |
Returns whether specified string is a valid directory path. | |
static void | RemoveLeadingSeparator (std::string &path) |
Removes the leading separator, if any, in specified directory's path. | |
static bool | IsAbsolutePath (const std::string &path) |
Tells whether specified path is an absolute path. | |
static std::string | GetCurrentWorkingDirectoryPath () |
Returns the current working directory name. | |
static void | ChangeWorkingDirectory (const std::string &newWorkingDirectory) |
Changes current working directory to newWorkingDirectory. | |
static std::list< std::string > | SplitPath (const std::string &path) |
static std::string | JoinPath (const std::list< std::string > &pathElements) |
static std::string | JoinPath (const std::string &firstPath, const std::string &secondPath) |
static void | StripFilename (const std::string &path, std::string *base, std::string *file=0) |
Separates the full pathname path into a basename base and file name file. | |
static Ceylan::Latin1Char | GetSeparator () |
static std::string | GetSeparatorAsString () |
static const std::string | ToString (std::list< TextDisplayable * > displayables, Ceylan::VerbosityLevels level=Ceylan::high) |
Returns a user-friendly description of this list of pointers to text displayable instances. | |
static TextOutputFormat | GetOutputFormat () |
Returns the current overall text format to be used by TextDisplayable instances. | |
static void | SetOutputFormat (TextOutputFormat newOutputFormat) |
Sets the current overall text format to be used by TextDisplayable instances. | |
Protected Member Functions | |
virtual FileSystemManager & | getCorrespondingFileSystemManager () const |
Returns the libfat filesystem manager. | |
virtual void | secureCorrespondingFileSystemManager () const |
Ensures that the libfat filesystem manager is actually available, by instanciating it if necessary. | |
Static Protected Member Functions | |
static FileSystemManager & | GetCorrespondingFileSystemManager () |
Returns the filesystem manager that should be used by Directory static methods, which is the default manager. | |
Protected Attributes | |
std::string | _path |
The path a directory instance refers to. | |
Static Protected Attributes | |
static const std::string | RootDirectoryPrefix |
static const std::string | CurrentDirectoryAlias |
static const std::string | UpperDirectoryAlias |
static const char | Separator |
static TextOutputFormat | _OutputFormat = rawText |
The text format to be used currently by TextDisplayable instances. | |
Private Member Functions | |
LibfatDirectory (const LibfatDirectory &source) | |
Copy constructor made private to ensure that it will be never called. | |
LibfatDirectory & | operator= (const LibfatDirectory &source) |
Assignment operator made private to ensure that it will be never called. |
Actual directories should be created and opened with respectively the Directory::Create and Directory::Open factories, that allow the user program to be cross-platform by hiding each filesystem-related per-platform specificity.
Definition at line 71 of file CeylanLibfatDirectory.h.
enum Ceylan::TextDisplayable::TextOutputFormat [inherited] |
Defines what text output formats for TextDisplayable instances are available.
Definition at line 124 of file CeylanTextDisplayable.h.
LibfatDirectory::~LibfatDirectory | ( | ) | throw () [virtual] |
Destroys the directory reference, not the directory itself.
Definition at line 102 of file CeylanLibfatDirectory.cc.
LibfatDirectory::LibfatDirectory | ( | const std::string & | directoryName = "" , |
|
bool | create = true | |||
) | [explicit] |
Creates a LibfatDirectory reference on a directory either already existing, or to be created on disk thanks to the operating system facilities.
directoryName | the name of the directory to create. If this string is empty, then the current directory of the process will be retained. |
DirectoryException,including | DirectoryCreationFailed if the operation failed or is not supported on this platform, or DirectoryDelegatingException if the relevant filesystem manager could not be retrieved. |
Definition at line 520 of file CeylanLibfatDirectory.cc.
References Ceylan::System::Directory::_path, CEYLAN_LOG, Ceylan::System::FileSystemManager::existsAsDirectory(), Ceylan::System::explainError(), getCorrespondingFileSystemManager(), Ceylan::System::FileSystemManager::getCurrentWorkingDirectoryPath(), Ceylan::System::FileSystemManager::getRootDirectoryPrefix(), Ceylan::System::FileSystemManager::getSeparatorAsString(), Ceylan::System::FileSystemManager::isAbsolutePath(), Ceylan::System::Directory::isValid(), Ceylan::System::FileSystemManager::joinPath(), dataUtils::path, Ceylan::System::Directory::removeLeadingSeparator(), and Ceylan::System::FileSystemManager::splitPath().
Ceylan::System::LibfatDirectory::LibfatDirectory | ( | const LibfatDirectory & | source | ) | [private] |
Copy constructor made private to ensure that it will be never called.
The compiler should complain whenever this undefined constructor is called, implicitly or not.
void Directory::ChangeWorkingDirectory | ( | const std::string & | newWorkingDirectory | ) | [static, inherited] |
Changes current working directory to newWorkingDirectory.
newWorkingDirectory | the target working directory. |
DirectoryException | if the operation failed or is not supported on this platform. This includes throwing a more specific DirectoryDelegatingException (a child class of DirectoryException), should the underlying filesystem manager not be retrieved as expected. |
Definition at line 184 of file CeylanDirectory.cc.
References Ceylan::System::FileSystemManager::changeWorkingDirectory(), and Ceylan::System::Directory::GetCorrespondingFileSystemManager().
Referenced by Ceylan::System::Process::Restart().
void Directory::Copy | ( | const std::string & | sourceDirectoryname, | |
const std::string & | targetDirectoryname | |||
) | [static, inherited] |
Copies the directory on filesystem.
sourceDirectoryname | the path of the directory to be copied. | |
targetDirectoryname | the path of the target directory. |
DirectoryException,including | DirectoryCopyFailed if the operation failed or is not supported on this platform, or DirectoryDelegatingException should the underlying filesystem manager not be retrieved as expected. |
Definition at line 114 of file CeylanDirectory.cc.
References Ceylan::System::FileSystemManager::copyDirectory(), and Ceylan::System::Directory::GetCorrespondingFileSystemManager().
LibfatDirectory & LibfatDirectory::Create | ( | const std::string & | newDirectoryName | ) | [static] |
Returns a LibfatDirectory reference on a directory newly created on disk, thanks to the operating system facilities.
newDirectoryName | the name of the directory to create. |
DirectoryException,including | DirectoryCreationFailed if the operation failed or is not supported on this platform, or DirectoryDelegatingException if the relevant filesystem manager could not be retrieved. |
Reimplemented from Ceylan::System::Directory.
Definition at line 502 of file CeylanLibfatDirectory.cc.
References LibfatDirectory().
Referenced by Ceylan::System::LibfatFileSystemManager::createDirectory().
bool Directory::Exists | ( | const std::string & | directoryPath | ) | [static, inherited] |
Tells whether the directory directoryPath exists and is a directory indeed.
directoryPath | the directory path to look-up. |
DirectoryException,including | DirectoryLookupFailed if the operation failed (existence test failed with no answer) or is not supported on this platform, or DirectoryDelegatingException should the underlying filesystem manager not be retrieved as expected. |
Definition at line 80 of file CeylanDirectory.cc.
References Ceylan::System::FileSystemManager::existsAsDirectory(), and Ceylan::System::Directory::GetCorrespondingFileSystemManager().
FileSystemManager & Directory::GetCorrespondingFileSystemManager | ( | ) | [static, protected, inherited] |
Returns the filesystem manager that should be used by Directory static methods, which is the default manager.
DirectoryDelegatingException | if the operation failed. |
Definition at line 433 of file CeylanDirectory.cc.
References dataUtils::e, Ceylan::System::FileSystemManager::GetAnyDefaultFileSystemManager(), and Ceylan::Exception::toString().
Referenced by Ceylan::System::Directory::ChangeWorkingDirectory(), Ceylan::System::Directory::Copy(), Ceylan::System::Directory::Create(), Ceylan::System::Directory::Exists(), Ceylan::System::Directory::GetCurrentWorkingDirectoryPath(), Ceylan::System::Directory::GetLastChangeTime(), Ceylan::System::Directory::GetSeparator(), Ceylan::System::Directory::IsAbsolutePath(), Ceylan::System::Directory::IsAValidDirectoryPath(), Ceylan::System::Directory::JoinPath(), Ceylan::System::Directory::Move(), Ceylan::System::Directory::Open(), Ceylan::System::Directory::Remove(), Ceylan::System::Directory::RemoveLeadingSeparator(), Ceylan::System::Directory::SplitPath(), and Ceylan::System::Directory::StripFilename().
FileSystemManager & LibfatDirectory::getCorrespondingFileSystemManager | ( | ) | const [protected, virtual] |
Returns the libfat filesystem manager.
DirectoryDelegatingException | if the operation failed. |
Implements Ceylan::System::Directory.
Definition at line 634 of file CeylanLibfatDirectory.cc.
References dataUtils::e, Ceylan::System::LibfatFileSystemManager::GetLibfatFileSystemManager(), and Ceylan::Exception::toString().
Referenced by hasDirectory(), hasEntry(), hasFile(), and LibfatDirectory().
string Directory::GetCurrentWorkingDirectoryPath | ( | ) | [static, inherited] |
Returns the current working directory name.
DirectoryException | if the operation failed or is not supported on this platform. This includes throwing a more specific DirectoryDelegatingException (a child class of DirectoryException), should the underlying filesystem manager not be retrieved as expected. |
Definition at line 173 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::getCurrentWorkingDirectoryPath().
Referenced by Ceylan::System::Process::SaveState().
void LibfatDirectory::getEntries | ( | std::list< std::string > & | entries | ) | const [virtual] |
Returns the names of all direct entries of any type of this directory (including files and directories), in the specified list.
entries | the caller-provided list in which entries will be added. |
DirectoryLookupFailed | if the operation failed or is not supported. |
Implements Ceylan::System::Directory.
Definition at line 384 of file CeylanLibfatDirectory.cc.
References Ceylan::System::Directory::_path, and PATH_MAX.
Referenced by Ceylan::System::LibfatFileSystemManager::removeDirectory().
void LibfatDirectory::getFiles | ( | std::list< std::string > & | files | ) | const [virtual] |
Returns the names of all regular files and symbolic links of this directory, in the specified list.
files | the caller-provided list in which regular files and symbolic links will be added. |
DirectoryLookupFailed | if the operation failed or is not supported. |
Implements Ceylan::System::Directory.
Definition at line 337 of file CeylanLibfatDirectory.cc.
References Ceylan::System::Directory::_path, and PATH_MAX.
time_t Directory::GetLastChangeTime | ( | const std::string & | directoryPath | ) | [static, inherited] |
Returns the last change time of the specified directory.
directoryPath | the path of the directory whose last change time is searched. |
DirectoryLastChangeTimeRequestFailed | if the operation failed or is not supported on this platform, or DirectoryDelegatingException if the relevant filesystem manager could not be retrieved. |
Definition at line 126 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::getLastChangeTimeDirectory().
TextDisplayable::TextOutputFormat TextDisplayable::GetOutputFormat | ( | ) | [static, inherited] |
Returns the current overall text format to be used by TextDisplayable instances.
Definition at line 63 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::formatStringList(), Ceylan::formatStringMap(), Ceylan::XML::XMLMarkup::toString(), Ceylan::Maths::Linear::Vector3::toString(), Ceylan::Maths::Linear::Vector2::toString(), Ceylan::Maths::Linear::Tripoint::toString(), Ceylan::Module::toString(), Ceylan::Maths::Linear::Matrix3::toString(), Ceylan::Maths::Linear::Matrix2::toString(), Ceylan::Maths::Linear::HomogeneousMatrix3::toString(), and Ceylan::Maths::Linear::Bipoint::toString().
const std::string & Directory::getPath | ( | ) | const [virtual, inherited] |
Returns the path of the directory which is referred to.
Definition at line 378 of file CeylanDirectory.cc.
References Ceylan::System::Directory::_path.
Referenced by Ceylan::Log::LogAggregatorHTML::aggregate(), and Ceylan::Log::LogAggregatorHTML::write().
Ceylan::Latin1Char Directory::GetSeparator | ( | ) | [static, inherited] |
Definition at line 239 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::getSeparator().
Referenced by Ceylan::System::Directory::GetSeparatorAsString().
string Directory::GetSeparatorAsString | ( | ) | [static, inherited] |
Definition at line 249 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetSeparator(), and Ceylan::System::Directory::toString().
void LibfatDirectory::getSortedEntries | ( | std::list< std::string > & | subDirectories, | |
std::list< std::string > & | files, | |||
std::list< std::string > & | otherEntries | |||
) | const [virtual] |
Returns the names of all direct entries of any type of this directory (including files and directories), in the corresponding specified list.
subDirectories | the caller-provided list in which subDirectories of this directory will be added. | |
files | the caller-provided list in which files of this directory will be added. | |
otherEntries | the caller-provided list in which other entries (named FIFO, sockets, etc.) of this directory will be added. |
DirectoryLookupFailed | if the operation failed or is not supported. |
Implements Ceylan::System::Directory.
Definition at line 429 of file CeylanLibfatDirectory.cc.
References Ceylan::System::Directory::_path, and PATH_MAX.
void LibfatDirectory::getSubdirectories | ( | std::list< std::string > & | subDirectories | ) | const [virtual] |
Returns the names of all direct subdirectories of this directory, in the specified list.
subDirectories | the caller-provided list in which subdirectories will be added. |
DirectoryLookupFailed | if the operation failed or is not supported. |
Implements Ceylan::System::Directory.
Definition at line 288 of file CeylanLibfatDirectory.cc.
References Ceylan::System::Directory::_path, and PATH_MAX.
void Directory::goDown | ( | const std::string & | subdirectoryName | ) | [virtual, inherited] |
Definition at line 308 of file CeylanDirectory.cc.
References Ceylan::System::Directory::_path, dataUtils::e, Ceylan::System::FileSystemManager::existsAsDirectory(), Ceylan::System::Directory::getCorrespondingFileSystemManager(), Ceylan::System::Directory::hasEntry(), Ceylan::System::FileSystemManager::joinPath(), and Ceylan::Exception::toString().
bool LibfatDirectory::hasDirectory | ( | const std::string & | subdirectoryName | ) | const [virtual] |
Tells whether the directory has a direct subdirectory named subdirectoryName.
subdirectoryName | the name of the directory entry to look-up. Alias for current directory (ex: '.') and parent one (ex: '..') are always deemed existing. |
DirectoryLookupFailed | is the operation failed or is not supported. |
Implements Ceylan::System::Directory.
Definition at line 124 of file CeylanLibfatDirectory.cc.
References Ceylan::System::Directory::_path, dataUtils::e, Ceylan::System::FileSystemManager::getAliasForCurrentDirectory(), Ceylan::System::FileSystemManager::getAliasForParentDirectory(), getCorrespondingFileSystemManager(), Ceylan::System::FileSystemManager::joinPath(), Ceylan::Exception::toString(), and generalUtils::true.
bool LibfatDirectory::hasEntry | ( | const std::string & | entryName | ) | const [virtual] |
Tells whether the directory has a direct entry named entryName, whatever the entry is (file, directory, named FIFO, socket, etc.
), except aliases for current directory (ex: '.') and parent one (ex: '..') that are ignored (false is returned for them).
entryName | the name of the entry to look-up. |
DirectoryLookupFailed | is the operation failed or is not supported. |
Implements Ceylan::System::Directory.
Definition at line 233 of file CeylanLibfatDirectory.cc.
References Ceylan::System::Directory::_path, dataUtils::e, Ceylan::System::FileSystemManager::getAliasForCurrentDirectory(), Ceylan::System::FileSystemManager::getAliasForParentDirectory(), getCorrespondingFileSystemManager(), Ceylan::System::FileSystemManager::joinPath(), Ceylan::Exception::toString(), and generalUtils::true.
bool LibfatDirectory::hasFile | ( | const std::string & | fileName | ) | const [virtual] |
Tells whether the directory has a direct file or symbolic link named fileName.
fileName | the name of the file to look-up. |
DirectoryLookupFailed | is the operation failed or is not supported. |
Implements Ceylan::System::Directory.
Definition at line 181 of file CeylanLibfatDirectory.cc.
References Ceylan::System::Directory::_path, dataUtils::e, getCorrespondingFileSystemManager(), Ceylan::System::FileSystemManager::joinPath(), and Ceylan::Exception::toString().
bool Directory::IsAbsolutePath | ( | const std::string & | path | ) | [static, inherited] |
Tells whether specified path is an absolute path.
path | the path that may be absolute. |
DirectoryException | if the operation failed or is not supported on this platform. This includes throwing a more specific DirectoryDelegatingException (a child class of DirectoryException), should the underlying filesystem manager not be retrieved as expected. |
Definition at line 163 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::isAbsolutePath().
bool Directory::IsAValidDirectoryPath | ( | const std::string & | directoryString | ) | [static, inherited] |
Returns whether specified string is a valid directory path.
directoryString | the directory string. |
DirectoryException | if the operation failed or is not supported on this platform. This includes throwing a more specific DirectoryDelegatingException (a child class of DirectoryException), should the underlying filesystem manager not be retrieved as expected. |
Definition at line 141 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::isAValidDirectoryPath().
bool Directory::isValid | ( | ) | const [virtual, inherited] |
Tells whether the reference on the directory is valid.
Checks that corresponding path exists, and that it is a directory.
DirectoryException | if the operation failed or is not supported. |
Definition at line 364 of file CeylanDirectory.cc.
References Ceylan::System::Directory::_path, Ceylan::System::FileSystemManager::existsAsDirectory(), and Ceylan::System::Directory::getCorrespondingFileSystemManager().
Referenced by LibfatDirectory(), and Ceylan::System::StandardDirectory::StandardDirectory().
string Directory::JoinPath | ( | const std::string & | firstPath, | |
const std::string & | secondPath | |||
) | [static, inherited] |
Definition at line 215 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::joinPath().
string Directory::JoinPath | ( | const std::list< std::string > & | pathElements | ) | [static, inherited] |
Definition at line 205 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::joinPath().
Referenced by Ceylan::System::FileLocator::find().
void Directory::Move | ( | const std::string & | sourceDirectoryname, | |
const std::string & | targetDirectoryname | |||
) | [static, inherited] |
Moves specified directory on filesystem.
A special case of directory moving is directory renaming.
sourceDirectoryname | the path of the directory to be moved. | |
targetDirectoryname | the path of the target directory. |
DirectoryException,including | DirectoryMoveFailed if the operation failed or is not supported on this platform, or DirectoryDelegatingException should the underlying filesystem manager not be retrieved as expected. |
Definition at line 102 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::moveDirectory().
LibfatDirectory & LibfatDirectory::Open | ( | const std::string & | directoryName = "" |
) | [static] |
Returns a LibfatDirectory reference on specified already-existing directory, which will be "opened" (i.e.
referred to), thanks to the operating system facilities.
directoryName | the name of the directory. If not specified (the string is empty), returns a reference to the current working directory. |
DirectoryException,including | DirectoryOpeningFailed if the operation failed or is not supported on this platform, or DirectoryDelegatingException if the relevant filesystem manager could not be retrieved. |
Reimplemented from Ceylan::System::Directory.
Definition at line 511 of file CeylanLibfatDirectory.cc.
References LibfatDirectory().
Referenced by Ceylan::System::LibfatFileSystemManager::openDirectory(), and Ceylan::System::LibfatFileSystemManager::removeDirectory().
LibfatDirectory& Ceylan::System::LibfatDirectory::operator= | ( | const LibfatDirectory & | source | ) | [private] |
Assignment operator made private to ensure that it will be never called.
The compiler should complain whenever this undefined operator is called, implicitly or not.
void Directory::Remove | ( | const std::string & | directoryPath, | |
bool | recursive = false | |||
) | [static, inherited] |
Removes the directory from disk.
directoryPath | the path of the target directory. | |
recursive | if false, the specified directory is expected to be empty, and it will be removed. If true, then the full directory content (including all files and possible subdirectories) and this directory itself will be removed. |
DirectoryException,including | DirectoryRemoveFailed if the operation failed or is not supported on this platform, or DirectoryDelegatingException should the underlying filesystem manager not be retrieved as expected. |
Definition at line 91 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::removeDirectory().
void Directory::removeLeadingSeparator | ( | ) | [virtual, inherited] |
Removes the leading separator, if any, in the path of this directory path.
DirectoryException | if the operation failed or is not supported. |
Definition at line 387 of file CeylanDirectory.cc.
References Ceylan::System::Directory::_path, Ceylan::System::Directory::getCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::removeLeadingSeparator().
Referenced by LibfatDirectory(), and Ceylan::System::StandardDirectory::StandardDirectory().
void Directory::RemoveLeadingSeparator | ( | std::string & | path | ) | [static, inherited] |
Removes the leading separator, if any, in specified directory's path.
path | the path that will be modified. |
DirectoryException | if the operation failed or is not supported on this platform. This includes throwing a more specific DirectoryDelegatingException (a child class of DirectoryException), should the underlying filesystem manager not be retrieved as expected. |
Definition at line 152 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::removeLeadingSeparator().
void LibfatDirectory::secureCorrespondingFileSystemManager | ( | ) | const [protected, virtual] |
Ensures that the libfat filesystem manager is actually available, by instanciating it if necessary.
DirectoryDelegatingException | if the operation failed. |
Definition at line 656 of file CeylanLibfatDirectory.cc.
References dataUtils::e, Ceylan::System::LibfatFileSystemManager::SecureLibfatFileSystemManager(), and Ceylan::Exception::toString().
void TextDisplayable::SetOutputFormat | ( | TextOutputFormat | newOutputFormat | ) | [static, inherited] |
Sets the current overall text format to be used by TextDisplayable instances.
newOutputFormat | the new output format. |
Definition at line 72 of file CeylanTextDisplayable.cc.
References Ceylan::TextDisplayable::_OutputFormat.
Referenced by Ceylan::Log::LogHolder::LogHolder().
list< string > Directory::SplitPath | ( | const std::string & | path | ) | [static, inherited] |
Definition at line 195 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::splitPath().
void Directory::StripFilename | ( | const std::string & | path, | |
std::string * | base, | |||
std::string * | file = 0 | |||
) | [static, inherited] |
Separates the full pathname path into a basename base and file name file.
For example, this method applied to "/mnt/raid/md0/LOANI-0.3" returns respectively "/mnt/raid/md0" and "LOANI-0.3", when the separator is '/'.
path | the path which is to be stripped. | |
base | if non null, must be a pointer to an already allocated string where the basename will be stored. If not interested in the basename, specify a null (0) pointer instead: this method will act as UNIX "basename". | |
file | if non null, must be a pointer to an already allocated string where the filename will be stored. If not interested in the filename, specify a null (0) pointer instead: this method will act as UNIX "dirname". |
DirectoryException | if the operation failed or is not supported on this platform. This includes throwing a more specific DirectoryDelegatingException (a child class of DirectoryException), should the underlying filesystem manager not be retrieved as expected. |
Definition at line 227 of file CeylanDirectory.cc.
References Ceylan::System::Directory::GetCorrespondingFileSystemManager(), and Ceylan::System::FileSystemManager::stripFilename().
Referenced by Ceylan::Log::LogPlug::GetSpeakerNameFrom().
const std::string TextDisplayable::ToString | ( | std::list< TextDisplayable * > | displayables, | |
Ceylan::VerbosityLevels | level = Ceylan::high | |||
) | [static, inherited] |
Returns a user-friendly description of this list of pointers to text displayable instances.
displayables | a list of pointers to TextDisplayable instances/ | |
level | the requested verbosity level. |
Definition at line 45 of file CeylanTextDisplayable.cc.
References Ceylan::formatStringList().
const string LibfatDirectory::toString | ( | Ceylan::VerbosityLevels | level = Ceylan::high |
) | const [virtual] |
Returns a user-friendly description of the state of this object.
level | the requested verbosity level. |
Reimplemented from Ceylan::System::Directory.
Definition at line 489 of file CeylanLibfatDirectory.cc.
References Ceylan::System::Directory::_path.
TextDisplayable::TextOutputFormat TextDisplayable::_OutputFormat = rawText [static, protected, inherited] |
The text format to be used currently by TextDisplayable instances.
Definition at line 158 of file CeylanTextDisplayable.h.
Referenced by Ceylan::TextDisplayable::GetOutputFormat(), and Ceylan::TextDisplayable::SetOutputFormat().
std::string Ceylan::System::Directory::_path [protected, inherited] |
The path a directory instance refers to.
Definition at line 762 of file CeylanDirectory.h.
Referenced by Ceylan::System::StandardDirectory::getEntries(), getEntries(), Ceylan::System::StandardDirectory::getFiles(), getFiles(), Ceylan::System::Directory::getPath(), Ceylan::System::StandardDirectory::getSortedEntries(), getSortedEntries(), Ceylan::System::StandardDirectory::getSubdirectories(), getSubdirectories(), Ceylan::System::Directory::goDown(), Ceylan::System::StandardDirectory::hasDirectory(), hasDirectory(), Ceylan::System::StandardDirectory::hasEntry(), hasEntry(), Ceylan::System::StandardDirectory::hasFile(), hasFile(), Ceylan::System::Directory::isValid(), LibfatDirectory(), Ceylan::System::Directory::removeLeadingSeparator(), Ceylan::System::StandardDirectory::StandardDirectory(), Ceylan::System::StandardDirectory::toString(), toString(), and Ceylan::System::Directory::toString().
const std::string Ceylan::System::LibfatDirectory::CurrentDirectoryAlias [static, protected] |
Definition at line 377 of file CeylanLibfatDirectory.h.
const std::string Ceylan::System::LibfatDirectory::RootDirectoryPrefix [static, protected] |
Definition at line 367 of file CeylanLibfatDirectory.h.
const char Ceylan::System::LibfatDirectory::Separator [static, protected] |
Definition at line 395 of file CeylanLibfatDirectory.h.
const std::string Ceylan::System::LibfatDirectory::UpperDirectoryAlias [static, protected] |
Definition at line 387 of file CeylanLibfatDirectory.h.