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