| 33 | BAN::ErrorOr<void> mount(const Credentials&, BAN::RefPtr<FileSystem>, BAN::StringView); |
| 34 | |
| 35 | struct File |
| 36 | { |
| 37 | File() = default; |
| 38 | explicit File(BAN::RefPtr<Inode> inode) |
| 39 | : inode(BAN::move(inode)) |
| 40 | { } |
| 41 | explicit File(BAN::RefPtr<Inode> inode, BAN::String&& canonical_path) |
| 42 | : inode(BAN::move(inode)) |
| 43 | , canonical_path(BAN::move(canonical_path)) |
| 44 | { } |
| 45 | |
| 46 | File(const File&) = delete; |
| 47 | File(File&& other) |
| 48 | : inode(BAN::move(other.inode)) |
| 49 | , canonical_path(BAN::move(other.canonical_path)) |
| 50 | { } |
| 51 | |
| 52 | File& operator=(const File&) = delete; |
| 53 | File& operator=(File&& other) |
| 54 | { |
| 55 | inode = BAN::move(other.inode); |
| 56 | canonical_path = BAN::move(other.canonical_path); |
| 57 | return *this; |
| 58 | } |
| 59 | |
| 60 | BAN::ErrorOr<File> clone() const |
| 61 | { |
| 62 | File result; |
| 63 | result.inode = inode; |
| 64 | TRY(result.canonical_path.append(canonical_path)); |
| 65 | return BAN::move(result); |
| 66 | } |
| 67 | |
| 68 | BAN::RefPtr<Inode> inode; |
| 69 | BAN::String canonical_path; |
| 70 | }; |
| 71 | |
| 72 | File root_file() |
| 73 | { |
no outgoing calls
no test coverage detected