tracy/server/TracyFilesystem.hpp

25 lines
467 B
C++
Raw Normal View History

2018-08-17 11:35:33 +00:00
#ifndef __TRACYFILESYSTEM_HPP__
#define __TRACYFILESYSTEM_HPP__
2020-04-17 17:09:13 +00:00
#include <stdint.h>
2018-08-17 11:35:33 +00:00
#include <sys/stat.h>
namespace tracy
{
2020-04-17 17:09:13 +00:00
class View;
2020-05-23 13:14:57 +00:00
class Worker;
2020-04-17 17:09:13 +00:00
2018-08-17 11:35:33 +00:00
static inline bool FileExists( const char* fn )
{
struct stat buf;
return stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0;
}
2020-05-23 13:14:57 +00:00
bool SourceFileValid( const char* fn, uint64_t olderThan, const View& view, const Worker& worker );
bool SourceFileValid( const char* fn, uint64_t olderThan );
2018-08-17 11:35:33 +00:00
}
#endif