#include <kratos_filesystem.h>
|
static std::string | CurrentWorkingDirectory () |
| Returns current working directory. More...
|
|
static std::string | JoinPaths (const std::vector< std::string > &rPaths) |
| Join paths. More...
|
|
static std::vector< std::filesystem::path > | ListDirectory (const std::filesystem::path &rPath) |
| Returns list of files and directories in rPath. More...
|
|
static void | MPISafeCreateDirectories (const std::filesystem::path &rPath) |
| Create directories in MPI, when sometimes filesystems are slow. Intended to be called by all ranks (that make use of this directory). It returns only after the folder exists. More...
|
|
static std::filesystem::path | ResolveSymlinks (const std::filesystem::path &rPath) |
| Resolve symlinks recursively. More...
|
|
◆ FilesystemExtensions() [1/2]
Kratos::FilesystemExtensions::FilesystemExtensions |
( |
| ) |
|
|
delete |
◆ FilesystemExtensions() [2/2]
◆ CurrentWorkingDirectory()
std::string Kratos::FilesystemExtensions::CurrentWorkingDirectory |
( |
| ) |
|
|
static |
Returns current working directory.
- Returns
- std::string
◆ JoinPaths()
std::string Kratos::FilesystemExtensions::JoinPaths |
( |
const std::vector< std::string > & |
rPaths | ) |
|
|
static |
Join paths.
- Parameters
-
rPaths | List of strings to be joined to get final path |
- Returns
- std::string Final joined path
◆ ListDirectory()
std::vector< std::filesystem::path > Kratos::FilesystemExtensions::ListDirectory |
( |
const std::filesystem::path & |
rPath | ) |
|
|
static |
Returns list of files and directories in rPath.
- Parameters
-
- Returns
- std::vector<std::filesystem::path> List of files and folders in rPath
◆ MPISafeCreateDirectories()
void Kratos::FilesystemExtensions::MPISafeCreateDirectories |
( |
const std::filesystem::path & |
rPath | ) |
|
|
static |
Create directories in MPI, when sometimes filesystems are slow. Intended to be called by all ranks (that make use of this directory). It returns only after the folder exists.
- Parameters
-
◆ operator=()
◆ ResolveSymlinks()
std::filesystem::path Kratos::FilesystemExtensions::ResolveSymlinks |
( |
const std::filesystem::path & |
rPath | ) |
|
|
static |
Resolve symlinks recursively.
- Parameters
-
rPath | path to a symbolic link. |
- Returns
- The result of the recursive dereferencing.
- Exceptions
-
If | the input path does not exist or the symlink is cyclic. |
- Note
- The existence of the final result is not checked and is up to the user.
-
The input is returned if it is not a symlink.
The documentation for this class was generated from the following files: