MCPcopy Create free account
hub / github.com/MisterTea/EternalTerminal / getFileInfo

Method getFileInfo

test/ServerFifoPathTest.cpp:49–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 }
48
49 FileInfo getFileInfo(const string& name) {
50 struct stat fileStat;
51 const int statResult = ::stat(name.c_str(), &fileStat);
52 if (statResult != 0) {
53 return FileInfo{};
54 }
55
56 FileInfo result;
57 result.exists = true;
58 result.mode = fileStat.st_mode;
59 return result;
60 }
61
62 void setEnv(const char* name, const string& value) {
63 backupEnv(name);

Callers 1

Calls 2

statClass · 0.70
c_strMethod · 0.45

Tested by

no test coverage detected