| 205 | } |
| 206 | |
| 207 | bool PosixFileSystem::remove(const Path& path) |
| 208 | { |
| 209 | // Should probably check for outstanding files or directory objects. |
| 210 | String file = buildFileName(_volume,path); |
| 211 | |
| 212 | struct stat info; |
| 213 | int error = stat(file.c_str(),&info); |
| 214 | if (error < 0) |
| 215 | return false; |
| 216 | |
| 217 | if (S_ISDIR(info.st_mode)) |
| 218 | return !rmdir(file); |
| 219 | |
| 220 | return !unlink(file); |
| 221 | } |
| 222 | |
| 223 | bool PosixFileSystem::rename(const Path& from,const Path& to) |
| 224 | { |
nothing calls this directly
no test coverage detected