| 119 | } |
| 120 | |
| 121 | std::shared_ptr<Symlink> |
| 122 | Directory::Handle::insertSymlink(const std::string& name, |
| 123 | const std::string& target) { |
| 124 | // Cannot insert into an unlinked directory. |
| 125 | if (!getParent()) { |
| 126 | return nullptr; |
| 127 | } |
| 128 | auto child = getDir()->insertSymlink(name, target); |
| 129 | if (!child) { |
| 130 | return nullptr; |
| 131 | } |
| 132 | cacheChild(name, child, DCacheKind::Normal); |
| 133 | updateMTime(); |
| 134 | return child; |
| 135 | } |
| 136 | |
| 137 | // TODO: consider moving this to be `Backend::move` to avoid asymmetry between |
| 138 | // the source and destination directories and/or taking `Directory::Handle` |
no outgoing calls
no test coverage detected