OpenStudio:utilities
 AllClasses Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages

#include "FileReference.hpp"

Public Member Functions

 FileReference (const openstudio::path &p)
 FileReference (const openstudio::UUID &uuid, const openstudio::UUID &versionUUID, const std::string &name, const std::string &displayName, const std::string &description, const openstudio::path &p, const FileReferenceType &fileType, const DateTime &timestampLast, const std::string &checksumCreate, const std::string &checksumLast)
virtual ~FileReference ()=default
FileReference clone () const
openstudio::UUID uuid () const
openstudio::UUID versionUUID () const
std::string name () const
std::string displayName () const
std::string description () const
openstudio::path path () const
FileReferenceType fileType () const
DateTime timestampLast () const
std::string checksumCreate () const
std::string checksumLast () const
void setName (const std::string &newName)
void setDisplayName (const std::string &newDisplayName)
void setDescription (const std::string &newDescription)
void setPath (const openstudio::path &newPath)
bool makePathAbsolute (const openstudio::path &searchDirectory)
bool makePathRelative (const openstudio::path &basePath=openstudio::path())
bool update (const openstudio::path &searchDirectory)

Related Functions

using FileReferenceVector = std::vector< FileReference >
using OptionalFileReference = boost::optional< FileReference >

Constructor & Destructor Documentation

openstudio::FileReference::FileReference ( const openstudio::path &  p)
explicit
openstudio::FileReference::FileReference ( const openstudio::UUID uuid,
const openstudio::UUID versionUUID,
const std::string &  name,
const std::string &  displayName,
const std::string &  description,
const openstudio::path &  p,
const FileReferenceType fileType,
const DateTime timestampLast,
const std::string &  checksumCreate,
const std::string &  checksumLast 
)

De-serialization constructor.

Not for general use.

virtual openstudio::FileReference::~FileReference ( )
virtualdefault

Member Function Documentation

std::string openstudio::FileReference::checksumCreate ( ) const

Checksum at time this object was created, if file exists.

Otherwise "00000000".

std::string openstudio::FileReference::checksumLast ( ) const
FileReference openstudio::FileReference::clone ( ) const
std::string openstudio::FileReference::description ( ) const
std::string openstudio::FileReference::displayName ( ) const
FileReferenceType openstudio::FileReference::fileType ( ) const
bool openstudio::FileReference::makePathAbsolute ( const openstudio::path &  searchDirectory)
bool openstudio::FileReference::makePathRelative ( const openstudio::path &  basePath = openstudio::path())

Save the path as relative to basePath, or just keep the file name and extension if basePath.empty().

std::string openstudio::FileReference::name ( ) const
openstudio::path openstudio::FileReference::path ( ) const
void openstudio::FileReference::setDescription ( const std::string &  newDescription)
void openstudio::FileReference::setDisplayName ( const std::string &  newDisplayName)
void openstudio::FileReference::setName ( const std::string &  newName)
void openstudio::FileReference::setPath ( const openstudio::path &  newPath)
DateTime openstudio::FileReference::timestampLast ( ) const

Last modified time of this file, or time object was created if path does not actually exist on the file system.

bool openstudio::FileReference::update ( const openstudio::path &  searchDirectory)

Returns true and updates timestampLast and checksumLast if file is located.

openstudio::UUID openstudio::FileReference::uuid ( ) const
openstudio::UUID openstudio::FileReference::versionUUID ( ) const

Friends And Related Function Documentation

using FileReferenceVector = std::vector<FileReference>
related
using OptionalFileReference = boost::optional<FileReference>
related