From 73ae5200a9701f104726b673752752250beafa4d Mon Sep 17 00:00:00 2001 From: Timothy Date: Wed, 30 Jun 2021 06:13:06 -0700 Subject: TextEditor+LibGUI: Use unveil and FileSystemAccessServer Making use of the new FileSystemAccessServer we are able to use unveil without restricting our ability to open and save files. A file argument will be unveiled automatically however all other files require user action via the FileSystemAccessServer to gain access. --- Userland/Libraries/LibGUI/TextEditor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Userland/Libraries/LibGUI/TextEditor.h') diff --git a/Userland/Libraries/LibGUI/TextEditor.h b/Userland/Libraries/LibGUI/TextEditor.h index ecbbf53eae..a287c0c6b1 100644 --- a/Userland/Libraries/LibGUI/TextEditor.h +++ b/Userland/Libraries/LibGUI/TextEditor.h @@ -116,7 +116,8 @@ public: TextRange normalized_selection() const { return m_selection.normalized(); } void insert_at_cursor_or_replace_selection(const StringView&); - bool write_to_file(const String& path); + bool write_to_file(String const& path); + bool write_to_file_and_close(int fd); bool has_selection() const { return m_selection.is_valid(); } String selected_text() const; size_t number_of_selected_words() const; -- cgit v1.2.3