#include <tools/Filesystem.hpp>
|
static std::string | filename (const std::string &Path) |
|
static std::string | basename (const std::string &Path) |
|
static std::string | dirname (const std::string &Path) |
|
static std::string | extension (const std::string &Path) |
|
static std::string | currentPath () |
|
static bool | isDirectory (const std::string &Path) |
|
static bool | isFile (const std::string &Path) |
|
static bool | makeDirectory (const std::string &Path) |
|
static bool | removeDirectory (const std::string &Path) |
|
static bool | removeFile (const std::string &Path) |
|
static bool | copyFile (const std::string &SrcPath, const std::string &DestPath) |
|
static bool | copyDirectory (const std::string &SrcPath, const std::string &DestPath, const bool DontCopyDotDirs=false) |
|
static std::string openfluid::tools::Filesystem::basename |
( |
const std::string & |
Path | ) |
|
|
static |
Returns the complete base name of the file in the given path
- Parameters
-
- Returns
- the base name of the file
static bool openfluid::tools::Filesystem::copyDirectory |
( |
const std::string & |
SrcPath, |
|
|
const std::string & |
DestPath, |
|
|
const bool |
DontCopyDotDirs = false |
|
) |
| |
|
static |
Recursively copies a directory from source to destination.
- Parameters
-
[in] | SrcPath | the source path |
[in] | DestPath | the destination path |
[in] | DontCopyDotDirs | if set to true, it ignores the directories beginning with a dot ('.'). Default is false |
- Returns
- true if the directory was successfully copied, false otherwise
static bool openfluid::tools::Filesystem::copyFile |
( |
const std::string & |
SrcPath, |
|
|
const std::string & |
DestPath |
|
) |
| |
|
static |
Copies a file from source to destination.
- Parameters
-
[in] | SrcPath | the source path |
[in] | DestPath | the destination path |
- Returns
- true if the file was successfully copied, false otherwise
static std::string openfluid::tools::Filesystem::currentPath |
( |
| ) |
|
|
static |
Returns the current application path
- Returns
- the current path
static std::string openfluid::tools::Filesystem::dirname |
( |
const std::string & |
Path | ) |
|
|
static |
Returns the directory name (parent path) of the given path
- Parameters
-
- Returns
- the directory name
static std::string openfluid::tools::Filesystem::extension |
( |
const std::string & |
Path | ) |
|
|
static |
Returns the extension of the file of the given path
- Parameters
-
- Returns
- the extension
static std::string openfluid::tools::Filesystem::filename |
( |
const std::string & |
Path | ) |
|
|
static |
Returns the name of the file in the given path
- Parameters
-
- Returns
- the filename
static bool openfluid::tools::Filesystem::isDirectory |
( |
const std::string & |
Path | ) |
|
|
static |
Returns true if the given path is a directory
- Parameters
-
- Returns
- true or false
static bool openfluid::tools::Filesystem::isFile |
( |
const std::string & |
Path | ) |
|
|
static |
Returns true if the given path is a file or a valid symbolic link
- Parameters
-
- Returns
- true or false
static bool openfluid::tools::Filesystem::makeDirectory |
( |
const std::string & |
Path | ) |
|
|
static |
Creates the directory of the given path. It creates all parent directories necessary to create the directory. If the directory already exists, it does nothing.
- Parameters
-
- Returns
- true if the directory was successfully created, false otherwise
static bool openfluid::tools::Filesystem::removeDirectory |
( |
const std::string & |
Path | ) |
|
|
static |
Removes the directory of the given path. It recursively deletes all contents of the directory.
- Parameters
-
- Returns
- true if the directory was successfully deleted, false otherwise
static bool openfluid::tools::Filesystem::removeFile |
( |
const std::string & |
Path | ) |
|
|
static |
Removes the file of the given path.
- Parameters
-
- Returns
- true if the file was successfully deleted, false otherwise
The documentation for this class was generated from the following file: