#include <FileInfo.hpp>
Public Member Functions | |
void | addRequiredFile (const QUrl &t_url, const openstudio::path &t_target) |
Adds a "requiredFile" for tracking for this FileInfo object. More... | |
void | addRequiredFile (const QUrl &t_url) |
Adds a required file with the target path being the filename of the passed in url. More... | |
void | addRequiredFile (const openstudio::path &t_location, const openstudio::path &t_target) |
Adds a required file with the given target name. More... | |
void | addRequiredFile (const openstudio::path &t_location) |
Adds a required file with the target path being the filename of the passed in path. More... | |
FileInfo | complete (const openstudio::path &t_basePath) const |
FileInfo (const std::string &t_filename, const openstudio::DateTime &t_lastModified, const std::string &t_key, const openstudio::path &t_fullPath=openstudio::path(), bool t_exists=true) | |
Construct a FileInfo object. More... | |
FileInfo (const openstudio::path &t_path, const std::string &t_key) | |
Construct a FileInfo from a openstudio::path. More... | |
FileInfo () | |
std::pair< QUrl, openstudio::path > | getRequiredFile (const openstudio::path &filename) |
Returns the details of a required file attached to this FileInfo if it exists. More... | |
bool | hasRequiredFile (const openstudio::path &filename) |
bool | operator!= (const FileInfo &t_rhs) const |
bool | operator< (const FileInfo &fi) const |
bool | operator== (const FileInfo &t_rhs) const |
void | prependRequiredFilePath (const openstudio::path &t_path) |
Prepends a path onto the requiredFiles. More... | |
Public Attributes | |
bool | exists |
True if the file exists, false if it was removed. More... | |
std::string | filename |
Short filename. More... | |
openstudio::path | fullPath |
Full local filename. More... | |
std::string | key |
A key identifying the type / usage of this file. More... | |
openstudio::DateTime | lastModified |
Date of last file modification. More... | |
std::vector< std::pair< QUrl, openstudio::path > > | requiredFiles |
Files required by this FileInfo object. More... | |
Basic file information class used by runmanager for handling tracking of which input and output files to and from Job objects.
openstudio::runmanager::FileInfo::FileInfo | ( | const std::string & | t_filename, |
const openstudio::DateTime & | t_lastModified, | ||
const std::string & | t_key, | ||
const openstudio::path & | t_fullPath = openstudio::path() , |
||
bool | t_exists = true |
||
) |
Construct a FileInfo object.
[in] | t_filename | The short file name of the file |
[in] | t_lastModified | The last modified time of the file |
[in] | t_key | The "key" by which this file is known. For example, an in.idf for processing might be known as "idf" for other idf based tools to find it |
[in] | t_fullPath | The full path of the file on the local disk. If this represents a file on a remote disk, this item might not provided. |
[in] | t_exists | True if the file exists, false if it represents a (recently) removed file. |
openstudio::runmanager::FileInfo::FileInfo | ( | const openstudio::path & | t_path, |
const std::string & | t_key | ||
) |
openstudio::runmanager::FileInfo::FileInfo | ( | ) |
void openstudio::runmanager::FileInfo::addRequiredFile | ( | const QUrl & | t_url, |
const openstudio::path & | t_target | ||
) |
Adds a "requiredFile" for tracking for this FileInfo object.
When a FileInfo is used as input to a Job, the required files attached to the given FileInfo are brought along automatically. They (or references to them) are placed in the working directory that the Job uses during execution.
[in] | t_url | Url of required file |
[in] | t_target | Target filename of required file |
void openstudio::runmanager::FileInfo::addRequiredFile | ( | const QUrl & | t_url | ) |
Adds a required file with the target path being the filename of the passed in url.
[in] | t_url | Url of requried file |
void openstudio::runmanager::FileInfo::addRequiredFile | ( | const openstudio::path & | t_location, |
const openstudio::path & | t_target | ||
) |
Adds a required file with the given target name.
[in] | t_location | Path of the required file. Converted to a QUrl internally |
[in] | t_target | Target filename of required file |
void openstudio::runmanager::FileInfo::addRequiredFile | ( | const openstudio::path & | t_location | ) |
Adds a required file with the target path being the filename of the passed in path.
[in] | t_location | Path of the required file. Converted to a QUrl internally |
FileInfo openstudio::runmanager::FileInfo::complete | ( | const openstudio::path & | t_basePath | ) | const |
std::pair<QUrl, openstudio::path> openstudio::runmanager::FileInfo::getRequiredFile | ( | const openstudio::path & | filename | ) |
Returns the details of a required file attached to this FileInfo if it exists.
The lookup is performed on the target location of the file.
std::runtime_error | if the required file could not be found |
bool openstudio::runmanager::FileInfo::hasRequiredFile | ( | const openstudio::path & | filename | ) |
bool openstudio::runmanager::FileInfo::operator!= | ( | const FileInfo & | t_rhs | ) | const |
bool openstudio::runmanager::FileInfo::operator< | ( | const FileInfo & | fi | ) | const |
bool openstudio::runmanager::FileInfo::operator== | ( | const FileInfo & | t_rhs | ) | const |
void openstudio::runmanager::FileInfo::prependRequiredFilePath | ( | const openstudio::path & | t_path | ) |
Prepends a path onto the requiredFiles.
bool openstudio::runmanager::FileInfo::exists |
True if the file exists, false if it was removed.
std::string openstudio::runmanager::FileInfo::filename |
Short filename.
openstudio::path openstudio::runmanager::FileInfo::fullPath |
Full local filename.
std::string openstudio::runmanager::FileInfo::key |
A key identifying the type / usage of this file.
openstudio::DateTime openstudio::runmanager::FileInfo::lastModified |
Date of last file modification.