mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Adapt filesystem_error to new File error handling, expose on File.
This commit is contained in:
parent
1df505331a
commit
8655b6d915
@ -37,11 +37,7 @@ namespace std {
|
||||
namespace filesystem {
|
||||
|
||||
struct filesystem_error {
|
||||
const BYTE err;
|
||||
|
||||
operator bool() const {
|
||||
return err != FR_OK;
|
||||
}
|
||||
const uint32_t err;
|
||||
|
||||
std::string what() const;
|
||||
};
|
||||
@ -129,6 +125,14 @@ public:
|
||||
return err == FR_OK;
|
||||
}
|
||||
|
||||
bool bad() const {
|
||||
return err != FR_OK;
|
||||
}
|
||||
|
||||
std::filesystem::filesystem_error error() const {
|
||||
return { err };
|
||||
}
|
||||
|
||||
bool read(void* const data, const size_t bytes_to_read);
|
||||
bool write(const void* const data, const size_t bytes_to_write);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user