| 25 | } |
| 26 | |
| 27 | bool NFs::SetExecutable(const TString& path, bool exec) { |
| 28 | #ifdef _unix_ |
| 29 | TFileStat stat(path); |
| 30 | ui32 mode = stat.Mode; |
| 31 | if (exec) { |
| 32 | mode |= S_IXUSR | S_IXGRP | S_IXOTH; |
| 33 | } else { |
| 34 | mode &= ~(S_IXUSR | S_IXGRP | S_IXOTH); |
| 35 | } |
| 36 | if (stat.Mode != 0 && mode != stat.Mode) { |
| 37 | return !Chmod(path.c_str(), mode); |
| 38 | } |
| 39 | #endif |
| 40 | Y_UNUSED(exec); |
| 41 | Y_UNUSED(path); |
| 42 | return true; |
| 43 | } |
| 44 | |
| 45 | void NFs::RemoveRecursive(const TString& path) { |
| 46 | static const TStringBuf errStr = "error while removing "; |