mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
Add support for removing directories.
It's really only supported in Ext2FS since SynthFS doesn't really want you mucking around with its files. This is pretty neat though :^) I ran into some trouble with HashMap while working on this but opted to work around it and leave that for a separate investigation.
This commit is contained in:
parent
031c62a21e
commit
c95228b128
19 changed files with 185 additions and 40 deletions
|
@ -54,9 +54,9 @@ public:
|
|||
|
||||
private:
|
||||
// ^Inode
|
||||
virtual ssize_t read_bytes(off_t, size_t, byte* buffer, FileDescriptor*) override;
|
||||
virtual ssize_t read_bytes(off_t, size_t, byte* buffer, FileDescriptor*) const override;
|
||||
virtual InodeMetadata metadata() const override;
|
||||
virtual bool traverse_as_directory(Function<bool(const FS::DirectoryEntry&)>) override;
|
||||
virtual bool traverse_as_directory(Function<bool(const FS::DirectoryEntry&)>) const override;
|
||||
virtual InodeIdentifier lookup(const String& name) override;
|
||||
virtual String reverse_lookup(InodeIdentifier) override;
|
||||
virtual void flush_metadata() override;
|
||||
|
@ -64,6 +64,7 @@ private:
|
|||
virtual bool add_child(InodeIdentifier child_id, const String& name, byte file_type, int& error) override;
|
||||
virtual bool remove_child(const String& name, int& error) override;
|
||||
virtual RetainPtr<Inode> parent() const override;
|
||||
virtual size_t directory_entry_count() const override;
|
||||
|
||||
SynthFS& fs();
|
||||
const SynthFS& fs() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue