KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Public Member Functions | Static Public Member Functions | List of all members
Kratos::FilesystemExtensions Class Reference

#include <kratos_filesystem.h>

Collaboration diagram for Kratos::FilesystemExtensions:

Public Member Functions

 FilesystemExtensions ()=delete
 Default constructor. More...
 
 FilesystemExtensions (FilesystemExtensions const &rOther)=delete
 Copy constructor. More...
 
FilesystemExtensionsoperator= (FilesystemExtensions const &rOther)=delete
 Assignment operator. More...
 

Static Public Member Functions

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...
 

Constructor & Destructor Documentation

◆ FilesystemExtensions() [1/2]

Kratos::FilesystemExtensions::FilesystemExtensions ( )
delete

Default constructor.

◆ FilesystemExtensions() [2/2]

Kratos::FilesystemExtensions::FilesystemExtensions ( FilesystemExtensions const &  rOther)
delete

Copy constructor.

Member Function Documentation

◆ 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
rPathsList 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
rPathPath
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
rPathPath

◆ operator=()

FilesystemExtensions& Kratos::FilesystemExtensions::operator= ( FilesystemExtensions const &  rOther)
delete

Assignment operator.

◆ ResolveSymlinks()

std::filesystem::path Kratos::FilesystemExtensions::ResolveSymlinks ( const std::filesystem::path &  rPath)
static

Resolve symlinks recursively.

Parameters
rPathpath to a symbolic link.
Returns
The result of the recursive dereferencing.
Exceptions
Ifthe 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: