diff options
| author | Amlal EL Mahrouss <amlal@softwarelabs.com> | 2024-06-15 11:07:19 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlal@softwarelabs.com> | 2024-06-15 11:07:19 +0200 |
| commit | 999877265276c8a5ae78eb01c92d1d9928a13576 (patch) | |
| tree | 1f80bea80726dfc3fe12d14809160619dcc40174 /Usr/Sys/CoreSystem/Sources/File.c | |
| parent | 1efed3cbec879134d55aee8e13c6bbc6da9b6ef6 (diff) | |
MHR-31: ARM Support: Removing API from repository.
Signed-off-by: Amlal EL Mahrouss <amlal@softwarelabs.com>
Diffstat (limited to 'Usr/Sys/CoreSystem/Sources/File.c')
| -rw-r--r-- | Usr/Sys/CoreSystem/Sources/File.c | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/Usr/Sys/CoreSystem/Sources/File.c b/Usr/Sys/CoreSystem/Sources/File.c deleted file mode 100644 index 2e34d782..00000000 --- a/Usr/Sys/CoreSystem/Sources/File.c +++ /dev/null @@ -1,69 +0,0 @@ -/* ------------------------------------------- - - Copyright Zeta Electronics Corporation - -------------------------------------------- */ - -#include <Headers/Defines.h> -#include <Headers/File.h> - -enum FileOp -{ - kFlushFile, - kReadFork, - kWriteFork, - kOpenFork, - kCloseFork, -}; - -/// @brief Opens a new file. -/// @param path where to find it. -/// @param rest the restrict (rw, rwe, r+, w+, r, w) -/// @return FSRef file reference. -CS_EXTERN_C FSRef CSOpenFile(const CharacterTypeUTF8* path, - const CharacterTypeUTF8* rest) -{ - CS_MUST_PASS(kSharedApplication); - CS_MUST_PASS(path && CSIsValidPath(path) == Yes); - CS_MUST_PASS(rest); - - return kSharedApplication->Invoke(kSharedApplication, kCallOpenFile, path, - rest); -} - -/// @brief Closes the file and flushes it to the said file. -/// @param refCS the filesystem reference. -/// @return void -CS_EXTERN_C VoidType CSCloseFile(FSRef refCS) -{ - CS_MUST_PASS(kSharedApplication); - - CSFlushFile(refCS); - - kSharedApplication->Invoke(kSharedApplication, kCallCloseFile, refCS); -} - -/// @brief Flush file -/// @param refCS the file reference. -/// @return void -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 the filesystem path. -/// @return if the path is valid or not. -CS_EXTERN_C BooleanType CSIsValidPath(const CharacterTypeUTF8* path) -{ - CS_MUST_PASS(kSharedApplication); - CS_MUST_PASS(path); - - return kSharedApplication->Invoke(kSharedApplication, kCallFileExists, path) || - kSharedApplication->Invoke(kSharedApplication, kCallDirectoryExists, path) || - kSharedApplication->Invoke(kSharedApplication, kCallSymlinkExists, path) || - kSharedApplication->Invoke(kSharedApplication, kCallDriveExists, path) || - kSharedApplication->Invoke(kSharedApplication, kCallDeviceExists, path); -}
\ No newline at end of file |
