1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:48:11 +00:00
serenity/Userland/Libraries/LibCore
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
..
Account.cpp LibCore: Fix building LibCore on FreeBSD 2021-06-09 09:24:58 +02:00
Account.h LibCore: Fix building LibCore on FreeBSD 2021-06-09 09:24:58 +02:00
AnonymousBuffer.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
AnonymousBuffer.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ArgsParser.cpp LibCore/ArgsParser: Learn how to stop on first non-option 2021-06-08 11:30:58 +02:00
ArgsParser.h LibCore/ArgsParser: Learn how to stop on first non-option 2021-06-08 11:30:58 +02:00
CMakeLists.txt AK+LibCore: Remove empty files 2021-03-12 17:38:17 +01:00
Command.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
Command.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ConfigFile.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
ConfigFile.h LibCore: Add getter for how many groups exist in a Core::ConfigFile 2021-06-30 08:18:28 +04:30
DateTime.cpp LibCore: Add a way to parse a DateTime from a string 2021-06-11 23:58:28 +04:30
DateTime.h LibCore: Add a way to parse a DateTime from a string 2021-06-11 23:58:28 +04:30
DirIterator.cpp LibCore: Expose DirIterator's underlying file descriptor 2021-05-14 23:32:10 +02:00
DirIterator.h LibCore: Expose DirIterator's underlying file descriptor 2021-05-14 23:32:10 +02:00
ElapsedTimer.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ElapsedTimer.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Event.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Event.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EventLoop.cpp LibCore+AK: Use proper atomics in Singleton 2021-06-24 17:35:49 +04:30
EventLoop.h AK: Rename Vector::append(Vector) => Vector::extend(Vector) 2021-06-12 13:24:45 +02:00
File.cpp AK+Everywhere: Use mostly StringView in LexicalPath 2021-06-30 11:13:54 +02:00
File.h LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
FileStream.h LibCore: Add InputFileStream::seek 2021-06-25 20:48:14 +04:30
FileWatcher.cpp AK: Remove the LexicalPath::is_valid() API 2021-06-30 11:13:54 +02:00
FileWatcher.h Userland+LibCore: Update FileWatcher + its users for InodeWatcher 2.0 2021-05-12 22:38:20 +02:00
Forward.h LibGUI: Move widget registration to LibCore 2021-05-06 08:50:39 +02:00
GetPassword.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
GetPassword.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
IODevice.cpp AK: Remove the public ByteBuffer::trim method 2021-05-31 14:49:00 +04:30
IODevice.h LibCore: Open files with O_CLOEXEC by default 2021-05-17 13:32:19 +02:00
LocalServer.cpp LibCore: Close accepted sockets on exec() and make them non-blocking 2021-05-17 13:32:19 +02:00
LocalServer.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
LocalSocket.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
LocalSocket.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
MimeData.cpp LibCore+Userland: Add 13 more detectable file types 2021-05-24 18:55:56 +01:00
MimeData.h LibCore: Implement basic mime type guessing based on binary patterns 2021-05-07 11:46:53 +01:00
NetworkJob.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NetworkJob.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NetworkResponse.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
NetworkResponse.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Notifier.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Notifier.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Object.cpp LibCore: Replace fprintf(stderr)/printf() with warnln()/out() 2021-05-31 17:43:54 +01:00
Object.h LibCore: Call optional did_construct() method when constucting objects 2021-06-20 14:57:26 +02:00
ProcessStatisticsReader.cpp LibCore: Replace fprintf(stderr)/printf() with warnln()/out() 2021-05-31 17:43:54 +01:00
ProcessStatisticsReader.h LibCore: Make ProcessStatisticsReader return results in a Vector 2021-05-23 11:10:15 +02:00
Property.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Property.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Socket.cpp LibCore: Replace fprintf(stderr)/printf() with warnln()/out() 2021-05-31 17:43:54 +01:00
Socket.h LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
SocketAddress.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StandardPaths.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
StandardPaths.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
TCPServer.cpp LibCore: Allow TCPServer to be blocking 2021-06-16 09:10:48 +02:00
TCPServer.h LibCore: Allow TCPServer to be blocking 2021-06-16 09:10:48 +02:00
TCPSocket.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
TCPSocket.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Timer.cpp LibCore: Add unit to Core::Timer interval arguments 2021-05-12 22:38:20 +02:00
Timer.h LibCore: Add unit to Core::Timer interval arguments 2021-05-12 22:38:20 +02:00
UDPServer.cpp AK: Remove the public ByteBuffer::trim method 2021-05-31 14:49:00 +04:30
UDPServer.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
UDPSocket.cpp LibCore+Everywhere: Move OpenMode out of IODevice 2021-05-12 11:00:45 +01:00
UDPSocket.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00