Notepad menu (#1072)

* WIP notepad menu
This commit is contained in:
Kyle Reed 2023-05-26 01:02:17 -07:00 committed by GitHub
parent 53fcdedb88
commit 00667cecf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 472 additions and 192 deletions

View file

@ -241,10 +241,11 @@ std::filesystem::filesystem_error rename_file(
std::filesystem::filesystem_error copy_file(
const std::filesystem::path& file_path,
const std::filesystem::path& dest_path) {
// Decent compromise between memory and speed.
constexpr size_t buffer_size = 512;
uint8_t buffer[buffer_size];
File src;
File dst;
constexpr size_t buffer_size = 128;
uint8_t buffer[buffer_size];
auto error = src.open(file_path);
if (error.is_valid()) return error.value();