tracy/server/TracyFilesystem.cpp
2020-05-23 14:54:16 +02:00

28 lines
587 B
C++

#include "TracyFilesystem.hpp"
#include "TracyView.hpp"
namespace tracy
{
bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view )
{
struct stat buf;
if( stat( view.SourceSubstitution( fn ), &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0 )
{
return (uint64_t)buf.st_mtime < olderThan;
}
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;
}
}