This class implements a file and url resolver.
More...
#include <FileResolver.h>
|
| | FileResolver () |
| | Creates a new resolver object.
|
| |
| bool | addReferencePath (const Directory &reference) |
| | Registers the reference path.
|
| |
| Files | resolve (const File &file, const bool checkExistence=false) const |
| | Resolves the absolute paths of a file.
|
| |
| Files | resolve (const Files &files, const bool checkExistence=false) const |
| | Resolves absolute paths of several files.
|
| |
| Files | resolve (const File &file, const Path &reference, const bool checkExistence=false) const |
| | Resolves the absolute paths of a file by an additional reference path.
|
| |
| Files | resolve (const Files &files, const Path &reference, const bool checkExistence=false) const |
| | Resolves the absolute paths of several file by an additional reference path.
|
| |
|
| static FileResolver & | get () |
| | Returns a reference to the unique object.
|
| |
| | Singleton ()=default |
| | Default constructor.
|
| |
This class implements a file and url resolver.
This resolver is implemented as singleton.
However, it can be used as local object anyway.
◆ FileResolver()
| Ocean::IO::FileResolver::FileResolver |
( |
| ) |
|
Creates a new resolver object.
Beware: Do not use this constructor if the global resolver object is requestet.
◆ addReferencePath()
| bool Ocean::IO::FileResolver::addReferencePath |
( |
const Directory & |
reference | ) |
|
Registers the reference path.
- Parameters
-
| reference | Reference path to register |
- Returns
- True, if the reference path is a valid absolute path
◆ resolve() [1/4]
| Files Ocean::IO::FileResolver::resolve |
( |
const File & |
file, |
|
|
const bool |
checkExistence = false |
|
) |
| const |
Resolves the absolute paths of a file.
- Parameters
-
| file | File to resolve |
| checkExistence | False, to return file paths even if they do not exist |
- Returns
- Resolved absolute file paths
◆ resolve() [2/4]
| Files Ocean::IO::FileResolver::resolve |
( |
const File & |
file, |
|
|
const Path & |
reference, |
|
|
const bool |
checkExistence = false |
|
) |
| const |
Resolves the absolute paths of a file by an additional reference path.
- Parameters
-
| file | File to resolve |
| reference | Additional reference path |
| checkExistence | False, to return file paths even if they do not existh |
- Returns
- Resolved absolute file paths
◆ resolve() [3/4]
| Files Ocean::IO::FileResolver::resolve |
( |
const Files & |
files, |
|
|
const bool |
checkExistence = false |
|
) |
| const |
Resolves absolute paths of several files.
- Parameters
-
| files | Files to resolve |
| checkExistence | False, to return file paths even if they do not exist |
- Returns
- Resolved absolute file paths
◆ resolve() [4/4]
| Files Ocean::IO::FileResolver::resolve |
( |
const Files & |
files, |
|
|
const Path & |
reference, |
|
|
const bool |
checkExistence = false |
|
) |
| const |
Resolves the absolute paths of several file by an additional reference path.
- Parameters
-
| files | Files to resolve |
| reference | Additional reference path |
| checkExistence | False, to return file paths even if they do not exist |
- Returns
- Resolved absolute file paths
◆ referencePaths
Registered reference paths.
The documentation for this class was generated from the following file: