diff options
Diffstat (limited to 'SDK/Libraries/CoreSystem')
| -rw-r--r-- | SDK/Libraries/CoreSystem/Headers/File.h | 5 | ||||
| -rw-r--r-- | SDK/Libraries/CoreSystem/Sources/File.c | 13 |
2 files changed, 17 insertions, 1 deletions
diff --git a/SDK/Libraries/CoreSystem/Headers/File.h b/SDK/Libraries/CoreSystem/Headers/File.h index 0013b074..cfd9ee30 100644 --- a/SDK/Libraries/CoreSystem/Headers/File.h +++ b/SDK/Libraries/CoreSystem/Headers/File.h @@ -49,4 +49,9 @@ CS_EXTERN_C FSForkRef CSGetFork(FSRef refCS, const CharacterTypeUTF8* forkName); /// @return if not return false, or true. CS_EXTERN_C BooleanType CSIsValidPath(const CharacterTypeUTF8* path); +/// @brief Flush file +/// @param refCS the file reference. +/// @return +CS_EXTERN_C VoidType CSFlushFile(FSRef refCS); + /// END OF FILE diff --git a/SDK/Libraries/CoreSystem/Sources/File.c b/SDK/Libraries/CoreSystem/Sources/File.c index 7547e7f2..6e0e810a 100644 --- a/SDK/Libraries/CoreSystem/Sources/File.c +++ b/SDK/Libraries/CoreSystem/Sources/File.c @@ -38,10 +38,21 @@ CS_EXTERN_C VoidType CSCloseFile(FSRef refCS) { CS_MUST_PASS(kSharedApplication); - kSharedApplication->Invoke(kSharedApplication, refCS, kFlushFile); + CSFlushFile(refCS); + kSharedApplication->Invoke(kSharedApplication, kCallCloseFile, refCS); } +/// @brief Flush file +/// @param refCS the file reference. +/// @return +CS_EXTERN_C VoidType CSFlushFile(FSRef refCS) +{ + CS_MUST_PASS(kSharedApplication); + + kSharedApplication->Invoke(kSharedApplication, refCS, kFlushFile); +} + /// @brief Check if filesystem path is valid. /// @param path /// @return |
