mirror of
https://github.com/thunderbrewhq/bc.git
synced 2025-12-12 10:02:30 +00:00
feat(file): add function File::Flush
This commit is contained in:
parent
667a125748
commit
acbdbfd2ef
2 changed files with 16 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue