Class DirManager

Inheritance Relationships

Base Type

Class Documentation

class DirManager : public eCAL::Util::IDirManager

Public Functions

virtual bool dirExists(const std::string &path_) const override

Check if the specified directory exists. Wrapper function for eCAL Utils Filesystem functionality.

Parameters:

path_ – The path to the directory.

Returns:

true if the directory exists, false otherwise.

virtual bool createDir(const std::string &path_) const override

Create the specified directory. Wrapper function for eCAL Utils Filesystem functionality.

Parameters:

path_ – The path to the directory.

Returns:

true if the directory was created, false otherwise.

virtual bool dirExistsOrCreate(const std::string &path_) const override

Check if the specified directory exists or create it.

Parameters:

path_ – The path to the directory.

Returns:

true if the directory exists or was created, false otherwise and when path_ is empty.

virtual bool createEcalDirStructure(const std::string &path_) const override

Create the eCAL directory structure.

   The function creates the specified directory and the logs subdirectory.

Parameters:

path_ – The path to the eCAL directory.

Returns:

true if the directory structure was created, false otherwise.

virtual std::string findFileInPaths(const std::vector<std::string> &paths_, const std::string &file_name_) const override

Find the specified file in the provided paths.

Parameters:
  • paths_ – The paths to search in.

  • file_name_ – The name of the file to find.

Returns:

std::string The first valid complete path to the file. Returns empty string if no valid path could be found.

virtual bool canWriteToDirectory(const std::string &path_) const override

Check if the specified directory is writable.

Parameters:

path_ – The path to the directory.

Returns:

true if the directory is writable, false otherwise.

virtual std::string getDirectoryPath(const std::string &file_path_) const override

Get the directory path of the specified file.

Parameters:

filePath – The path to the file.

Returns:

std::string The directory path of the file.