tracy/server/TracyFilesystem.cpp

28 lines
587 B
C++
Raw Normal View History

2020-04-17 17:09:13 +00:00
#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;
}
2020-04-17 17:09:13 +00:00
}