diff options
author | Karol Kosek <krkk@serenityos.org> | 2022-12-17 00:52:07 +0100 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2023-01-07 10:53:43 +0000 |
commit | 86f6586c6e7edb454bacd820ba37bd8b7d9e8e11 (patch) | |
tree | ff6da500f68c435fd2ee1bed0ad8118aad132051 /Userland/Libraries/LibFileSystemAccessClient/Client.h | |
parent | 2cbe2dd3c0cc9e783068419f4ba9a9798e87e1c7 (diff) | |
download | serenity-86f6586c6e7edb454bacd820ba37bd8b7d9e8e11.zip |
LibFileSystemAccessClient: Add functions returning FSAC::File
This patch reimplements the now deprecated try_open_file(),
try_request_file() and try_request_file_read_only_approved() functions,
with the difference that the new ones return a FSAC::File object
(currently a wrapper with a Core::Stream and a filename) instead of a
Core::File.
Implemented in a similar manner to 6dd716adf2.
Diffstat (limited to 'Userland/Libraries/LibFileSystemAccessClient/Client.h')
-rw-r--r-- | Userland/Libraries/LibFileSystemAccessClient/Client.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibFileSystemAccessClient/Client.h b/Userland/Libraries/LibFileSystemAccessClient/Client.h index b0c0360f3b..32236bc0f0 100644 --- a/Userland/Libraries/LibFileSystemAccessClient/Client.h +++ b/Userland/Libraries/LibFileSystemAccessClient/Client.h @@ -51,6 +51,9 @@ public: DeprecatedResult try_open_file_deprecated(GUI::Window* parent_window, DeprecatedString const& window_title = {}, StringView path = Core::StandardPaths::home_directory(), Core::OpenMode requested_access = Core::OpenMode::ReadOnly); DeprecatedResult try_save_file_deprecated(GUI::Window* parent_window, DeprecatedString const& name, DeprecatedString const ext, Core::OpenMode requested_access = Core::OpenMode::WriteOnly | Core::OpenMode::Truncate); + Result request_file_read_only_approved(GUI::Window* parent_window, DeprecatedString const& path); + Result request_file(GUI::Window* parent_window, DeprecatedString const& path, Core::Stream::OpenMode requested_access); + Result open_file(GUI::Window* parent_window, DeprecatedString const& window_title = {}, StringView path = Core::StandardPaths::home_directory(), Core::Stream::OpenMode requested_access = Core::Stream::OpenMode::Read); Result save_file(GUI::Window* parent_window, DeprecatedString const& name, DeprecatedString const ext, Core::Stream::OpenMode requested_access = Core::Stream::OpenMode::Write | Core::Stream::OpenMode::Truncate); static Client& the(); |