OpenStudioCore:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Related Functions | List of all members
openstudio::FileReference Class Reference

#include <FileReference.hpp>

Public Member Functions

Constructors and Destructors
 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 &timestampCreate, const DateTime &timestampLast, const std::string &checksumCreate, const std::string &checksumLast)
 De-serialization constructor. More...
 
virtual ~FileReference ()
 
FileReference clone () const
 
Getters
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 timestampCreate () const
 Time this object was created or time file was created, depending on whether path exists at time of construction. More...
 
DateTime timestampLast () const
 Last modified time of this file, or time object was created if path does not actually exist on the file system. More...
 
std::string checksumCreate () const
 Checksum at time this object was created, if file exists. More...
 
std::string checksumLast () const
 
Setters
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())
 Save the path as relative to basePath, or just keep the file name and extension if basePath.empty(). More...
 
bool update (const openstudio::path &searchDirectory)
 Returns true and updates timestampLast and checksumLast if file is located. More...
 

Related Functions

(Note that these are not member functions.)

typedef std::vector
< FileReference
FileReferenceVector
 
typedef boost::optional
< FileReference
OptionalFileReference
 

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 timestampCreate,
const DateTime timestampLast,
const std::string &  checksumCreate,
const std::string &  checksumLast 
)

De-serialization constructor.

Not for general use.

virtual openstudio::FileReference::~FileReference ( )
inlinevirtual

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::timestampCreate ( ) const

Time this object was created or time file was created, depending on whether path exists at time of construction.

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

typedef std::vector<FileReference> FileReferenceVector
related
typedef boost::optional<FileReference> OptionalFileReference
related