summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibFileSystemAccessClient
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2022-12-17 00:58:13 +0100
committerSam Atkins <atkinssj@gmail.com>2023-01-07 10:53:43 +0000
commit247db3fdd0e96b282f5ecb1c64da7bd533245611 (patch)
tree004ccd2ac253e0a56b5bb1fecbe57767aee3db59 /Userland/Libraries/LibFileSystemAccessClient
parente361025cfb4857c13fc4082f349ad169ba4a9231 (diff)
downloadserenity-247db3fdd0e96b282f5ecb1c64da7bd533245611.zip
LibFileSystemAccessClient: Rename try_* functions to try_*_deprecated
These functions return the deprecated `Core::File` class, so let's mark it as such to avoid possible confusion between future non try_* functions which will use Core::Stream family classes and to possibly grab someone's attention. :^)
Diffstat (limited to 'Userland/Libraries/LibFileSystemAccessClient')
-rw-r--r--Userland/Libraries/LibFileSystemAccessClient/Client.cpp6
-rw-r--r--Userland/Libraries/LibFileSystemAccessClient/Client.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Libraries/LibFileSystemAccessClient/Client.cpp b/Userland/Libraries/LibFileSystemAccessClient/Client.cpp
index 43ff22174a..3f6fcbcfd5 100644
--- a/Userland/Libraries/LibFileSystemAccessClient/Client.cpp
+++ b/Userland/Libraries/LibFileSystemAccessClient/Client.cpp
@@ -23,7 +23,7 @@ Client& Client::the()
return *s_the;
}
-DeprecatedResult Client::try_request_file_read_only_approved(GUI::Window* parent_window, DeprecatedString const& path)
+DeprecatedResult Client::try_request_file_read_only_approved_deprecated(GUI::Window* parent_window, DeprecatedString const& path)
{
auto const id = get_new_id();
m_promises.set(id, PromiseAndWindow { { Core::Promise<DeprecatedResult>::construct() }, parent_window });
@@ -69,7 +69,7 @@ static Core::Stream::OpenMode to_stream_open_mode(Core::OpenMode open_mode)
return result;
}
-DeprecatedResult Client::try_request_file(GUI::Window* parent_window, DeprecatedString const& path, Core::OpenMode deprecated_mode)
+DeprecatedResult Client::try_request_file_deprecated(GUI::Window* parent_window, DeprecatedString const& path, Core::OpenMode deprecated_mode)
{
auto const id = get_new_id();
m_promises.set(id, PromiseAndWindow { { Core::Promise<DeprecatedResult>::construct() }, parent_window });
@@ -96,7 +96,7 @@ DeprecatedResult Client::try_request_file(GUI::Window* parent_window, Deprecated
return handle_promise<DeprecatedResult>(id);
}
-DeprecatedResult Client::try_open_file(GUI::Window* parent_window, DeprecatedString const& window_title, StringView path, Core::OpenMode deprecated_requested_access)
+DeprecatedResult Client::try_open_file_deprecated(GUI::Window* parent_window, DeprecatedString const& window_title, StringView path, Core::OpenMode deprecated_requested_access)
{
auto const id = get_new_id();
m_promises.set(id, PromiseAndWindow { { Core::Promise<DeprecatedResult>::construct() }, parent_window });
diff --git a/Userland/Libraries/LibFileSystemAccessClient/Client.h b/Userland/Libraries/LibFileSystemAccessClient/Client.h
index 43ae92e8c8..93e88aa24b 100644
--- a/Userland/Libraries/LibFileSystemAccessClient/Client.h
+++ b/Userland/Libraries/LibFileSystemAccessClient/Client.h
@@ -27,9 +27,9 @@ class Client final
IPC_CLIENT_CONNECTION(Client, "/tmp/session/%sid/portal/filesystemaccess"sv)
public:
- DeprecatedResult try_request_file_read_only_approved(GUI::Window* parent_window, DeprecatedString const& path);
- DeprecatedResult try_request_file(GUI::Window* parent_window, DeprecatedString const& path, Core::OpenMode mode);
- DeprecatedResult try_open_file(GUI::Window* parent_window, DeprecatedString const& window_title = {}, StringView path = Core::StandardPaths::home_directory(), Core::OpenMode requested_access = Core::OpenMode::ReadOnly);
+ DeprecatedResult try_request_file_read_only_approved_deprecated(GUI::Window* parent_window, DeprecatedString const& path);
+ DeprecatedResult try_request_file_deprecated(GUI::Window* parent_window, DeprecatedString const& path, Core::OpenMode mode);
+ 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 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);