Support for partner file rename/delete

This commit is contained in:
Kyle Reed 2023-05-01 09:25:32 -07:00
parent bf4ed416bd
commit 2cba96ff36
4 changed files with 139 additions and 106 deletions

View file

@ -168,6 +168,7 @@ private:
bool operator==(const path& lhs, const path& rhs);
bool operator<(const path& lhs, const path& rhs);
bool operator>(const path& lhs, const path& rhs);
path operator+(const path& lhs, const path& rhs);
path operator/(const path& lhs, const path& rhs);
using file_status = BYTE;
@ -248,6 +249,7 @@ struct FATTimestamp {
uint16_t FAT_time;
};
bool file_exists(const std::filesystem::path& file_path);
uint32_t delete_file(const std::filesystem::path& file_path);
uint32_t rename_file(const std::filesystem::path& file_path, const std::filesystem::path& new_name);
FATTimestamp file_created_date(const std::filesystem::path& file_path);
@ -255,6 +257,8 @@ uint32_t make_new_directory(const std::filesystem::path& dir_path);
std::vector<std::filesystem::path> scan_root_files(const std::filesystem::path& directory, const std::filesystem::path& extension);
std::vector<std::filesystem::path> scan_root_directories(const std::filesystem::path& directory);
/* Gets an auto incrementing filename. */
std::filesystem::path next_filename_stem_matching_pattern(std::filesystem::path filename_stem_pattern);
/* Values added to FatFs FRESULT enum, values outside the FRESULT data type */