| 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); |
no test coverage detected