AGX Dynamics  2.35.0.1
agxIO::FileState Class Reference

Class for storing and comparing a change date for a file on disk. More...

#include <FileState.h>

Public Member Functions

 FileState ()
 Default constructor, not valid. More...
 
 FileState (const agx::String &filename)
 Constructor. More...
 
bool hasChanged () const
 Is the modified date different from the last call to reset()/Constructor? More...
 
bool operator!= (const FileState &other)
 
bool operator== (const FileState &other)
 
bool reset ()
 Refresh the last changed info from the file. More...
 

Detailed Description

Class for storing and comparing a change date for a file on disk.

Definition at line 32 of file FileState.h.

Constructor & Destructor Documentation

◆ FileState() [1/2]

agxIO::FileState::FileState ( const agx::String &  filename)

Constructor.

Parameters
filename- The file for which the date should be compared.

◆ FileState() [2/2]

agxIO::FileState::FileState ( )

Default constructor, not valid.

Member Function Documentation

◆ hasChanged()

bool agxIO::FileState::hasChanged ( ) const

Is the modified date different from the last call to reset()/Constructor?

◆ operator!=()

bool agxIO::FileState::operator!= ( const FileState &  other)
Returns
true if the two file states are NOT equal in modified time

◆ operator==()

bool agxIO::FileState::operator== ( const FileState &  other)
Returns
true if the two file states are equal in modified time

◆ reset()

bool agxIO::FileState::reset ( )

Refresh the last changed info from the file.

Returns
returns true if reset was successful, false if file did not exist and was not readable

The documentation for this class was generated from the following file: