mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Add file existence check.
This commit is contained in:
parent
27b2851291
commit
6bf7b85260
@ -135,6 +135,7 @@
|
||||
<ClInclude Include="..\..\..\server\TracyEvent.hpp" />
|
||||
<ClInclude Include="..\..\..\server\TracyFileHeader.hpp" />
|
||||
<ClInclude Include="..\..\..\server\TracyFileRead.hpp" />
|
||||
<ClInclude Include="..\..\..\server\TracyFilesystem.hpp" />
|
||||
<ClInclude Include="..\..\..\server\TracyFileWrite.hpp" />
|
||||
<ClInclude Include="..\..\..\server\TracyImGui.hpp" />
|
||||
<ClInclude Include="..\..\..\server\TracyMemory.hpp" />
|
||||
|
@ -194,6 +194,9 @@
|
||||
<ClInclude Include="..\..\..\server\TracyDecayValue.hpp">
|
||||
<Filter>server</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\server\TracyFilesystem.hpp">
|
||||
<Filter>server</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Natvis Include="DebugVis.natvis" />
|
||||
|
17
server/TracyFilesystem.hpp
Normal file
17
server/TracyFilesystem.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef __TRACYFILESYSTEM_HPP__
|
||||
#define __TRACYFILESYSTEM_HPP__
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
static inline bool FileExists( const char* fn )
|
||||
{
|
||||
struct stat buf;
|
||||
return stat( fn, &buf ) == 0 && ( buf.st_mode & S_IFREG ) != 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user