diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-17 09:54:17 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-17 10:08:50 +0200 |
| commit | c0099ab36bf9606c5503ceb0fa0d5b64f71c7203 (patch) | |
| tree | 1c310521280e3c995981a903895c7c2e124582ee /Public/Developer/SystemLib/Headers/File.h | |
| parent | f93fb4439aaa865d998a790348313a4c7163bb8b (diff) | |
Unrelated: These changes are important but related to nothing.
- Window now becomes Wm, as in Window manager.
- Fix entrypoint for FragLib.
- Remove CoreEvents to be replaced with Event Server, reworked Display Server.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Public/Developer/SystemLib/Headers/File.h')
| -rw-r--r-- | Public/Developer/SystemLib/Headers/File.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Public/Developer/SystemLib/Headers/File.h b/Public/Developer/SystemLib/Headers/File.h index 5e58d104..234c33da 100644 --- a/Public/Developer/SystemLib/Headers/File.h +++ b/Public/Developer/SystemLib/Headers/File.h @@ -14,8 +14,8 @@ typedef QWordType FSRef; /// @brief Opens a new file. /// @param path where to find it. -/// @param r the restrict (rw, rwe, r+, w+, r, w) -/// @return +/// @param rest the restrict (rw, rwe, r+, w+, r, w) +/// @return FSRef the file. CA_EXTERN_C FSRef FsOpenFile(const CharacterTypeUTF8* path, const CharacterTypeUTF8* r); /// @brief Closes the file and flushes it to the said file. @@ -23,13 +23,15 @@ CA_EXTERN_C FSRef FsOpenFile(const CharacterTypeUTF8* path, const CharacterTypeU /// @return CA_EXTERN_C VoidType FsCloseFile(FSRef refFs); +#define kMaxForkNameLength 256 /* long fork names. */ + /// @brief A fork information header. typedef struct _Fork { PtrVoidType forkData; SizeType forkSize; Int32Type forkFlags; Int32Type forkKind; - CharacterTypeUTF8 forkName[256]; + CharacterTypeUTF8 forkName[kMaxForkNameLength]; } ForkType; typedef ForkType* FSForkRef; @@ -40,5 +42,10 @@ typedef ForkType* FSForkRef; /// @return the fork data. CA_EXTERN_C FSForkRef FsGetFork(FSRef refFs, const CharacterTypeUTF8* forkName); +/// @brief Check if the filesystem path is valid. +/// @return if not return false, or true. +CA_EXTERN_C BooleanType FsIsValidPath(const CharacterTypeUTF8* path); + +/// @note not only limited to, there is code forks, icon forks... #define FsGetDataFork(refFs) FsGetFork(refFs, "data") #define FsGetRsrcFork(refFs) FsGetFork(refFs, "rsrc") |
