mirror of
https://github.com/thunderbrewhq/bc.git
synced 2025-12-12 01:52:30 +00:00
fix(file): add Blizzard::File::Flush
This commit is contained in:
parent
c305acb5f9
commit
e68a482072
3 changed files with 34 additions and 0 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include "bc/file/CreateDirectory.hpp"
|
||||
#include "bc/file/Delete.hpp"
|
||||
#include "bc/file/Exists.hpp"
|
||||
#include "bc/file/Flush.hpp"
|
||||
#include "bc/file/GetFileInfo.hpp"
|
||||
#include "bc/file/GetPos.hpp"
|
||||
#include "bc/file/GetWorkingDirectory.hpp"
|
||||
|
|
|
|||
18
bc/file/Flush.cpp
Normal file
18
bc/file/Flush.cpp
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#include "bc/file/Flush.cpp"
|
||||
#include "bc/system/file/Stacked.hpp"
|
||||
|
||||
namespace Blizzard {
|
||||
namespace File {
|
||||
|
||||
// flush
|
||||
bool Flush(StreamRecord* file) {
|
||||
System_File::Stacked::FileParms parms;
|
||||
parms.op = offsetof(Filesystem, flush);
|
||||
parms.file = file;
|
||||
|
||||
auto fs = System_File::Stacked::s_manager;
|
||||
return fs ? fs->flush(fs, &parms) : false;
|
||||
}
|
||||
|
||||
} // namespace File
|
||||
} // namespace Blizzard
|
||||
15
bc/file/Flush.hpp
Normal file
15
bc/file/Flush.hpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#ifndef BC_FILE_FLUSH_HPP
|
||||
#define BC_FILE_FLUSH_HPP
|
||||
|
||||
#include "bc/file/Types.hpp"
|
||||
|
||||
namespace Blizzard {
|
||||
namespace File {
|
||||
|
||||
// flush
|
||||
bool Flush(StreamRecord* file);
|
||||
|
||||
} // namespace File
|
||||
} // namespace Blizzard
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue