Parallel Make  1.0
My implementation of make utility, which can run in multiple threads according to user request.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
file Class Reference

Class representing basic file having name and timestamp of last modification. More...

#include <file.hpp>

Public Member Functions

 file (std::string &&name, time_t t=0)
 
time_t get_time () const
 
bool exists_on_disk () const
 
const std::string & get_name () const
 
bool is_recent (const file &f) const
 

Friends

bool operator< (const file &t1, const file &t2)
 
bool operator> (const file &t1, const file &t2)
 
bool operator== (const file &t1, const file &t2)
 
bool operator!= (const file &t1, const file &t2)
 

Detailed Description

Class representing basic file having name and timestamp of last modification.

!

Constructor & Destructor Documentation

file::file ( std::string &&  name,
time_t  t = 0 
)
inline

Constructor initalizing m_name and m_time with proper values.

Parameters
nameName of the file.
tif non zero, overrides real (system) last modification time.

Member Function Documentation

bool file::exists_on_disk ( ) const
inline

Checks whether file really exists on disk.

Returns
true if file exists, false otherwise.
const std::string& file::get_name ( ) const
inline

Gets name of the file.

Returns
const reference to file name.
time_t file::get_time ( ) const
inline

Gets time of last modification.

Returns
time of last modification.
bool file::is_recent ( const file &  f) const
inline

Checks, whether this file is more recent than argument.

Parameters
fto check against.
Returns
true if this file is more recent than f, false otherwise.

Friends And Related Function Documentation

bool operator!= ( const file &  t1,
const file &  t2 
)
friend
bool operator< ( const file &  t1,
const file &  t2 
)
friend
bool operator== ( const file &  t1,
const file &  t2 
)
friend
bool operator> ( const file &  t1,
const file &  t2 
)
friend

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