A class that encodes a file location.
More...
#include <FileLocation.h>
A class that encodes a file location.
◆ equal()
static bool wrench::FileLocation::equal |
( |
const std::shared_ptr< FileLocation > & |
lhs, |
|
|
const std::shared_ptr< FileLocation > & |
rhs |
|
) |
| |
|
inlinestatic |
Method to compare two file locations.
- Parameters
-
lhs | a file location |
rhs | a file location |
- Returns
- true if both locations are equivalent
◆ getAbsolutePathAtMountPoint()
std::string wrench::FileLocation::getAbsolutePathAtMountPoint |
( |
| ) |
|
Get the location's path at mount point.
- Returns
◆ getFullAbsolutePath()
std::string wrench::FileLocation::getFullAbsolutePath |
( |
| ) |
|
Get the location's full absolute path.
- Returns
◆ getMountPoint()
std::string wrench::FileLocation::getMountPoint |
( |
| ) |
|
Get the location's mount point.
- Returns
- a mount point
◆ getStorageService()
std::shared_ptr< StorageService > wrench::FileLocation::getStorageService |
( |
| ) |
|
Get the location's storage service.
- Returns
- a storage service
◆ LOCATION() [1/2]
File location specifier for a storage service's (single) mount point root.
- Parameters
-
ss | a storage service (that has a single mount point) |
- Returns
- a file location specification
- Exceptions
-
◆ LOCATION() [2/2]
std::shared_ptr< FileLocation > wrench::FileLocation::LOCATION |
( |
std::shared_ptr< StorageService > |
ss, |
|
|
std::string |
absolute_path |
|
) |
| |
|
static |
File location specifier given an absolute path at a storage service.
- Parameters
-
ss | a storage service or ComputeService::SCRATCH |
absolute_path | an absolute path at the storage service to a directory (that may contain files) |
- Returns
- a file location specification
- Exceptions
-
◆ properPathPrefix()
bool wrench::FileLocation::properPathPrefix |
( |
std::string |
path1, |
|
|
std::string |
path2 |
|
) |
| |
|
static |
Helper method to find if a path is a proper prefix of another path.
- Parameters
-
path1 | a path |
path2 | another path |
- Returns
- true if one of the two paths is a proper prefix of the other
◆ sanitizePath()
std::string wrench::FileLocation::sanitizePath |
( |
std::string |
path | ) |
|
|
static |
Method to sanitize an absolute path (and make it absolute if it's not)
- Parameters
-
- Returns
◆ toString()
std::string wrench::FileLocation::toString |
( |
| ) |
|
Give a <ss name>:<mount point>:<dir>" string for the location.
- Returns
- A string
The documentation for this class was generated from the following files: