Zen API

- Home
- Topics
- Types
- Files

All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kPath.h
Go to the documentation of this file.
1
10 #ifndef K_API_PATH_H
11 #define K_API_PATH_H
12
13 #include <kApi/kApiDef.h>
14
15 kBeginHeader()
16
17
18 #define kPATH_MAX (kxPATH_MAX)
19
34 typedef kObject kPath;
35
42 kFx(kChar) kPath_Separator();
43
51 kFx(kBool) kPath_IsSeparator(kChar ch);
52
65 kFx(kStatus) kPath_Combine(const kChar* segment1, const kChar* segment2, kChar* path, kSize capacity);
66
81 kFx(kStatus) kPath_Directory(const kChar* path, kChar* directory, kSize capacity);
82
94 kFx(kStatus) kPath_FileName(const kChar* path, kChar* fileName, kSize capacity);
95
107 kFx(kStatus) kPath_Extension(const kChar* path, kChar* extension, kSize capacity);
108
125 kFx(kStatus) kPath_ToRelative(const kChar* pathA, const kChar* pathB, kChar* bRelativeToA, kSize capacity);
126
143 kFx(kStatus) kPath_ToAbsolute(const kChar* pathA, const kChar* bRelativeToA, kChar* pathB, kSize capacity);
144
156 kFx(kStatus) kPath_Normalize(const kChar* path, kChar* normalized, kSize capacity);
157
169 kFx(kStatus) kPath_ToNative(const kChar* path, kChar* native, kSize capacity);
170
171 kEndHeader()
172
173 #include <kApi/Io/kPath.x.h>
174
175 #endif
kPath::kPath_FileName
kStatus kPath_FileName(const kChar *path, kChar *fileName, kSize capacity)
Given a file path, returns the portion of the path containing the file name.
kSize
Represents an unsigned integer that can store a pointer address.
kPath::kPath_ToNative
kStatus kPath_ToNative(const kChar *path, kChar *native, kSize capacity)
Transforms all path separators to native form.
kPath::kPath_ToRelative
kStatus kPath_ToRelative(const kChar *pathA, const kChar *pathB, kChar *bRelativeToA, kSize capacity)
Expresses an absolute path in relative form, in relation to a reference path.
kChar
Represents a single unit (byte) in a UTF-8 character.
kPath::kPath_Combine
kStatus kPath_Combine(const kChar *segment1, const kChar *segment2, kChar *path, kSize capacity)
Combines two path segments using the normalized path separator character.
kPath::kPath_ToAbsolute
kStatus kPath_ToAbsolute(const kChar *pathA, const kChar *bRelativeToA, kChar *pathB, kSize capacity)
Finds the absolute path expressed by the combination of an absolute path and a relative path...
kPath::kPath_Extension
kStatus kPath_Extension(const kChar *path, kChar *extension, kSize capacity)
Given a file path, returns the portion of the path containing the file extension. ...
kApiDef.h
Core Zen type declarations.
kPath::kPath_Separator
kChar kPath_Separator()
Returns the normalized path separator character.
kPath::kPath_Normalize
kStatus kPath_Normalize(const kChar *path, kChar *normalized, kSize capacity)
Transforms all path separators to normal form and removes trailing slashes.
kStatus
Represents an error code.
kPath::kPath_Directory
kStatus kPath_Directory(const kChar *path, kChar *directory, kSize capacity)
Returns the parent directory for a given file or directory path.
kBool
Represents a boolean value.
kPath::kPath_IsSeparator
kBool kPath_IsSeparator(kChar ch)
Determines if the given character is equal to the normalized path separator.