CASM  1.1.0
A Clusters Approach to Statistical Mechanics
FileData.cc
Go to the documentation of this file.
2 
3 #include <boost/filesystem.hpp>
4 
6 
7 namespace CASM {
8 
9 bool FileData::exists() const { return fs::exists(path()); }
10 
12  m_timestamp = 0;
13  if (this->exists()) {
14  m_timestamp = fs::last_write_time(path());
15  }
16 }
17 } // namespace CASM
bool exists() const
checks path for existing file. Does not alter stored timestamp
Definition: FileData.cc:9
std::string const & path() const
return stored path
Definition: FileData.hh:24
std::time_t m_timestamp
Definition: FileData.hh:52
void refresh()
Updates timestamp using stored path.
Definition: FileData.cc:11
Main CASM namespace.
Definition: APICommand.hh:8