diff --git a/bc/file/File.cpp b/bc/file/File.cpp index 86f9917..2bbc793 100644 --- a/bc/file/File.cpp +++ b/bc/file/File.cpp @@ -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); diff --git a/bc/file/File.hpp b/bc/file/File.hpp index da4399e..becffbc 100644 --- a/bc/file/File.hpp +++ b/bc/file/File.hpp @@ -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);