1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:57:35 +00:00

HexEditor: Use FileSystemAccessClient, add unveils

Most of the code here is based off the implementation of how
TextEditor uses FileSystemAccessClient.
This commit is contained in:
Mustafa Quraish 2021-09-02 07:03:44 -04:00 committed by Andreas Kling
parent eae21c7e31
commit 8f2521ce52
6 changed files with 109 additions and 31 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2021, Mustafa Quraish <mustafa@cs.toronto.edu>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -34,6 +35,7 @@ public:
void set_buffer(const ByteBuffer&);
void fill_selection(u8 fill_byte);
bool write_to_file(const String& path);
bool write_to_file(int fd);
void select_all();
bool has_selection() const { return !(m_selection_start == -1 || m_selection_end == -1 || (m_selection_end - m_selection_start) < 0 || m_buffer.is_empty()); }