| 186 | } |
| 187 | |
| 188 | FileNodeRef PosixFileSystem::create(const Path& path, FileNode::Mode mode) |
| 189 | { |
| 190 | // The file will be created on disk when it's opened. |
| 191 | if (mode & FileNode::File) |
| 192 | return new PosixFile(path,buildFileName(_volume,path)); |
| 193 | |
| 194 | // Default permissions are read/write/search/executate by everyone, |
| 195 | // though this will be modified by the current umask |
| 196 | if (mode & FileNode::Directory) |
| 197 | { |
| 198 | String file = buildFileName(_volume,path); |
| 199 | |
| 200 | if (mkdir(file.c_str(),S_IRWXU | S_IRWXG | S_IRWXO) == 0) |
| 201 | return new PosixDirectory(path,file); |
| 202 | } |
| 203 | |
| 204 | return 0; |
| 205 | } |
| 206 | |
| 207 | bool PosixFileSystem::remove(const Path& path) |
| 208 | { |
nothing calls this directly
no test coverage detected