1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 21:58:10 +00:00
serenity/Kernel/FileSystem
Max Wipfli 7405536a1a AK+Everywhere: Use mostly StringView in LexicalPath
This changes the m_parts, m_dirname, m_basename, m_title and m_extension
member variables to StringViews onto the m_string String. It also
removes the m_is_absolute member in favour of computing if a path is
absolute in the is_absolute() getter. Due to this, the canonicalize()
method has been completely rewritten.

The parts() getter still returns a Vector<String>, although it is no
longer a const reference as m_parts is no longer a Vector<String>.
Rather, it is constructed from the StringViews in m_parts upon request.
The parts_view() getter has been added, which returns Vector<StringView>
const&. Most previous users of parts() have been changed to use
parts_view(), except where Strings are required.

Due to this change, it's is now no longer allow to create temporary
LexicalPath objects to call the dirname, basename, title, or extension
getters on them because the returned StringViews will point to possible
freed memory.
2021-06-30 11:13:54 +02:00
..
AnonymousFile.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
AnonymousFile.h Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
BlockBasedFileSystem.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
BlockBasedFileSystem.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Custody.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
Custody.h Kernel: Rename Custody::create() => try_create() 2021-05-28 11:23:00 +02:00
DevFS.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
DevFS.h Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
DevPtsFS.cpp Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
DevPtsFS.h Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
ext2_fs.h Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
ext2_types.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Ext2FileSystem.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
Ext2FileSystem.h Kernel: Ensure Ext2FSInode's lookup is populated before using it 2021-06-22 11:01:59 +02:00
FIFO.cpp Kernel: Remove the now defunct LOCKER(..) macro. 2021-04-25 09:38:27 +02:00
FIFO.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
File.cpp Kernel: Closing a file descriptor should not always close the file 2021-04-30 11:42:35 +02:00
File.h Kernel: Implement multi-watch InodeWatcher :^) 2021-05-12 22:38:20 +02:00
FileBackedFileSystem.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
FileBackedFileSystem.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
FileDescription.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
FileDescription.h Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
FileSystem.cpp Kernel: Pull apart CPU.h 2021-06-24 00:38:23 +02:00
FileSystem.h Kernel: static vs non-static constexpr variables 2021-05-19 21:21:47 +01:00
Inode.cpp Kernel: Update check in Inode::read_entire 2021-06-17 19:52:54 +02:00
Inode.h Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
InodeFile.cpp Kernel: Change Inode::{read/write}_bytes interface to KResultOr<ssize_t> 2021-05-02 13:27:37 +02:00
InodeFile.h Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
InodeIdentifier.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
InodeMetadata.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
InodeWatcher.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
InodeWatcher.h Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
Plan9FileSystem.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
Plan9FileSystem.h Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
ProcFS.cpp Kernel/ProcFS: Tighten modified time value across the filesystem objects 2021-06-29 20:53:59 +02:00
ProcFS.h Kernel: Introduce the new ProcFS design 2021-06-29 20:53:59 +02:00
SysFS.cpp Kernel/SysFS: Add PCI exposed folder 2021-06-29 20:53:59 +02:00
SysFS.h Kernel: Introduce the new SysFS 2021-06-29 20:53:59 +02:00
TmpFS.cpp Everywhere: Use nothrow new with adopt_{ref,own}_if_nonnull 2021-06-24 17:35:49 +04:30
TmpFS.h Kernel: Remove various other uses of ssize_t 2021-06-16 21:29:36 +02:00
VirtualFileSystem.cpp AK+Everywhere: Use mostly StringView in LexicalPath 2021-06-30 11:13:54 +02:00
VirtualFileSystem.h Kernel: Don't assume there are no nodes if m_unveiled_paths.is_empty() 2021-06-08 12:15:04 +02:00