mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Substitution-less source file validator.
This commit is contained in:
parent
fa2559b3f0
commit
d052e4c79d
@ -14,4 +14,14 @@ bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view )
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SourceFileValid( const char* fn, uint64_t olderThan )
|
||||||
|
{
|
||||||
|
struct stat buf;
|
||||||
|
if( stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0 )
|
||||||
|
{
|
||||||
|
return (uint64_t)buf.st_mtime < olderThan;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ static inline bool FileExists( const char* fn )
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view );
|
bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view );
|
||||||
|
bool SourceFileValid( const char* fn, uint64_t olderThan );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user