mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Perform source file name substitution.
This commit is contained in:
@@ -1,26 +1,21 @@
|
||||
#ifndef __TRACYFILESYSTEM_HPP__
|
||||
#define __TRACYFILESYSTEM_HPP__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
class View;
|
||||
|
||||
static inline bool FileExists( const char* fn )
|
||||
{
|
||||
struct stat buf;
|
||||
return stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0;
|
||||
}
|
||||
|
||||
static inline 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;
|
||||
}
|
||||
bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view );
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user