feat(file): add function File::Flush

This commit is contained in:
phaneron 2023-08-14 20:47:09 -04:00
parent 667a125748
commit acbdbfd2ef
2 changed files with 16 additions and 0 deletions

View file

@ -45,6 +45,20 @@ bool Exists(const char* path) {
return status;
}
bool Flush(StreamRecord* stream) {
auto manager = System_File::Stacked::Manager();
if (!manager) {
return false;
}
System_File::Stacked::FileParms parms = {};
parms.stream = stream;
auto status = manager->Do(Filesystem::Call::Flush, &parms);
return status;
}
// Alias of Exists.
bool IsFile(const char* path) {
return Exists(path);

View file

@ -20,6 +20,8 @@ bool Delete(const char* path);
bool Exists(const char* path);
bool Flush(StreamRecord* stream);
bool IsFile(const char* path);
bool IsDirectory(const char* path);