| 104 | } |
| 105 | |
| 106 | std::shared_ptr<Directory> |
| 107 | Directory::Handle::insertDirectory(const std::string& name, mode_t mode) { |
| 108 | // Cannot insert into an unlinked directory. |
| 109 | if (!getParent()) { |
| 110 | return nullptr; |
| 111 | } |
| 112 | auto child = getDir()->insertDirectory(name, mode); |
| 113 | if (!child) { |
| 114 | return nullptr; |
| 115 | } |
| 116 | cacheChild(name, child, DCacheKind::Normal); |
| 117 | updateMTime(); |
| 118 | return child; |
| 119 | } |
| 120 | |
| 121 | std::shared_ptr<Symlink> |
| 122 | Directory::Handle::insertSymlink(const std::string& name, |
no outgoing calls
no test coverage detected