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 #include <kApi/Io/kPath.x.h>
15
17 #define kPATH_MAX (xkPATH_MAX)
18
33 typedef kObject kPath;
34
41 kFx(kChar) kPath_Separator();
42
50 kFx(kBool) kPath_IsSeparator(kChar ch);
51
64 kFx(kStatus) kPath_Combine(const kChar* segment1, const kChar* segment2, kChar* path, kSize capacity);
65
80 kFx(kStatus) kPath_Directory(const kChar* path, kChar* directory, kSize capacity);
81
93 kFx(kStatus) kPath_BaseName(const kChar* path, kChar* baseName, kSize capacity);
94
109 kFx(kStatus) kPath_FileName(const kChar* path, kChar* fileName, kSize capacity);
110
122 kFx(kStatus) kPath_Extension(const kChar* path, kChar* extension, kSize capacity);
123
135 kFx(kStatus) kPath_StripExtension(const kChar* path, kChar* strippedPath, kSize capacity);
136
153 kFx(kStatus) kPath_ToRelative(const kChar* pathA, const kChar* pathB, kChar* bRelativeToA, kSize capacity);
154
171 kFx(kStatus) kPath_ToAbsolute(const kChar* pathA, const kChar* bRelativeToA, kChar* pathB, kSize capacity);
172
180 kFx(kBool) kPath_IsAbsolute(const kChar* path);
181
189 kFx(kBool) kPath_IsFileNameValid(const kChar* fileName);
190
202 kFx(kStatus) kPath_ToNormal(const kChar* path, kChar* normalized, kSize capacity);
203
215 kFx(kStatus) kPath_ToNative(const kChar* path, kChar* native, kSize capacity);
216
228 kFx(kStatus) kPath_ToCanonical(const kChar* path, kChar* normalized, kSize capacity);
229
239 kFx(kStatus) kPath_LibraryName(const kChar* libraryName, kChar* fileName, kSize capacity);
240
252 kFx(kStatus) kPath_Plugin(const kChar* pluginName, kChar* pluginPath, kSize capacity);
253
263 kFx(kStatus) kPath_ApplicationName(const kChar* appName, kChar* fileName, kSize capacity);
264
276 kFx(kStatus) kPath_Application(const kChar* appName, kChar* appPath, kSize capacity);
277
278 #endif
kPath::kPath_ToCanonical
kStatus kPath_ToCanonical(const kChar *path, kChar *normalized, kSize capacity)
Transforms all path separators to normal form, canonicalizes the path by collapsing redundant separat...
kPath::kPath_Plugin
kStatus kPath_Plugin(const kChar *pluginName, kChar *pluginPath, kSize capacity)
Given a plugin name (e.g.
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.
kPath::kPath_Application
kStatus kPath_Application(const kChar *appName, kChar *appPath, kSize capacity)
Given a application name (e.g.
kPath::kPath_BaseName
kStatus kPath_BaseName(const kChar *path, kChar *baseName, kSize capacity)
Given a file path, returns the base name by stripping the parent directory portion.
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_LibraryName
kStatus kPath_LibraryName(const kChar *libraryName, kChar *fileName, kSize capacity)
Given a library name (e.g.
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. ...
kPath::kPath_IsAbsolute
kBool kPath_IsAbsolute(const kChar *path)
Determines whether the provided path in an absolute path.
kPath::kPath_StripExtension
kStatus kPath_StripExtension(const kChar *path, kChar *strippedPath, kSize capacity)
Given a file path, returns the portion of the path excluding the file extension.
kPath::kPath_ApplicationName
kStatus kPath_ApplicationName(const kChar *appName, kChar *fileName, kSize capacity)
Given a application name (e.g.
kApiDef.h
Core Zen type declarations.
kPath::kPath_ToNormal
kStatus kPath_ToNormal(const kChar *path, kChar *normalized, kSize capacity)
Transforms all path separators to normal form and removes trailing slashes.
kPath::kPath_Separator
kChar kPath_Separator()
Returns the normalized path separator character.
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_IsFileNameValid
kBool kPath_IsFileNameValid(const kChar *fileName)
Reports whether the provided file name is valid.
kPath::kPath_IsSeparator
kBool kPath_IsSeparator(kChar ch)
Determines if the given character is equal to the normalized path separator.