87 if (
_stat(path.c_str(), &
st) != 0)
89 return static_cast<time_t>(
st.st_mtime);
92 if (
stat(path.c_str(), &
st) != 0)
ComponentTypeID GetComponentTypeID_Static()
Poll-based file change detection (Phase 7).
void Reset()
Resets the baseline modification timestamp to the current file time.
bool HasChanged()
Returns true if the file's modification time has changed since the last Watch() or Reset() call.
void Watch(const std::string &path)
Starts watching path, recording the current modification time.
FileWatcher()
Constructs a FileWatcher that is not yet watching any file.
bool IsWatching() const
Returns true if a path has been set via Watch() or the path constructor.
const std::string & GetPath() const
Returns the path currently being watched.
static time_t GetFileModTime(const std::string &path)
Platform-portable wrapper around stat() / _stat().
< Provides AssetID and INVALID_ASSET_ID