Ocean
|
This class implements a file and url resolver. More...
Public Member Functions | |
FileResolver () | |
Creates a new resolver object. More... | |
bool | addReferencePath (const Directory &reference) |
Registers the reference path. More... | |
Files | resolve (const File &file, const bool checkExistence=false) const |
Resolves the absolute paths of a file. More... | |
Files | resolve (const Files &files, const bool checkExistence=false) const |
Resolves absolute paths of several files. More... | |
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. More... | |
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. More... | |
Private Attributes | |
Directories | referencePaths |
Registered reference paths. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Ocean::Singleton< FileResolver > | |
static FileResolver & | get () |
Returns a reference to the unique object. More... | |
Protected Member Functions inherited from Ocean::Singleton< FileResolver > | |
Singleton ()=default | |
Default constructor. More... | |
This class implements a file and url resolver.
This resolver is implemented as singleton.
However, it can be used as local object anyway.
Ocean::IO::FileResolver::FileResolver | ( | ) |
Creates a new resolver object.
Beware: Do not use this constructor if the global resolver object is requestet.
bool Ocean::IO::FileResolver::addReferencePath | ( | const Directory & | reference | ) |
Registers the reference path.
reference | Reference path to register |
Files Ocean::IO::FileResolver::resolve | ( | const File & | file, |
const bool | checkExistence = false |
||
) | const |
Resolves the absolute paths of a file.
file | File to resolve |
checkExistence | False, to return file paths even if they do not exist |
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.
file | File to resolve |
reference | Additional reference path |
checkExistence | False, to return file paths even if they do not existh |
Files Ocean::IO::FileResolver::resolve | ( | const Files & | files, |
const bool | checkExistence = false |
||
) | const |
Resolves absolute paths of several files.
files | Files to resolve |
checkExistence | False, to return file paths even if they do not exist |
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.
files | Files to resolve |
reference | Additional reference path |
checkExistence | False, to return file paths even if they do not exist |
|
private |
Registered reference paths.