1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

Kernel: Make Inode::create_child() take the name as a StringView

No sense in forcing callers to construct a String. One more small step
towards not using String in the kernel.
This commit is contained in:
Andreas Kling 2021-07-17 21:32:16 +02:00
parent 9359f7801f
commit 6766efff9c
15 changed files with 17 additions and 17 deletions

View file

@ -56,7 +56,7 @@ public:
virtual KResult traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)>) const = 0;
virtual RefPtr<Inode> lookup(StringView name) = 0;
virtual KResultOr<size_t> write_bytes(off_t, size_t, const UserOrKernelBuffer& data, FileDescription*) = 0;
virtual KResultOr<NonnullRefPtr<Inode>> create_child(const String& name, mode_t, dev_t, uid_t, gid_t) = 0;
virtual KResultOr<NonnullRefPtr<Inode>> create_child(StringView name, mode_t, dev_t, uid_t, gid_t) = 0;
virtual KResult add_child(Inode&, const StringView& name, mode_t) = 0;
virtual KResult remove_child(const StringView& name) = 0;
virtual KResultOr<size_t> directory_entry_count() const = 0;