diff options
author | Arne Elster <arne@elster.li> | 2021-11-12 19:33:45 +0100 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-12-23 23:25:47 -0800 |
commit | 60c3ad9ae845f0582f70901a965cee41d2a774ea (patch) | |
tree | cc0f25f255a3978d56e0c7cba8b61478039a8745 /Userland/Libraries/LibFileSystemAccessClient/Client.h | |
parent | 86363ffe6e8b9f437ee42a3c18dbc0de97cdbdf5 (diff) | |
download | serenity-60c3ad9ae845f0582f70901a965cee41d2a774ea.zip |
LibFileSystemAccessClient: Allow custom access rights for open/save
There can be cases when one wants to open a file not just for reading
but also for writing. It was already possible to have a custom open mode
for request_file, now it is also possible through the open/save dialogs.
Diffstat (limited to 'Userland/Libraries/LibFileSystemAccessClient/Client.h')
-rw-r--r-- | Userland/Libraries/LibFileSystemAccessClient/Client.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibFileSystemAccessClient/Client.h b/Userland/Libraries/LibFileSystemAccessClient/Client.h index 4a242aa3f1..f816c0cab6 100644 --- a/Userland/Libraries/LibFileSystemAccessClient/Client.h +++ b/Userland/Libraries/LibFileSystemAccessClient/Client.h @@ -29,8 +29,8 @@ class Client final public: Result request_file_read_only_approved(i32 parent_window_id, String const& path); Result request_file(i32 parent_window_id, String const& path, Core::OpenMode mode); - Result open_file(i32 parent_window_id, String const& window_title = {}, StringView path = Core::StandardPaths::home_directory()); - Result save_file(i32 parent_window_id, String const& name, String const ext); + Result open_file(i32 parent_window_id, String const& window_title = {}, StringView path = Core::StandardPaths::home_directory(), Core::OpenMode requested_access = Core::OpenMode::ReadOnly); + Result save_file(i32 parent_window_id, String const& name, String const ext, Core::OpenMode requested_access = Core::OpenMode::WriteOnly | Core::OpenMode::Truncate); static Client& the(); |