Path
Docs: https://docs.api.kunkun.sh/interfaces/index.IPath
No permission is required to use this API.
This API is very trivial and simple. It is used to get the path of various directories.
Read the docs for more.
import { path } from "@kksh/api/ui/template";
import { path } from "@kksh/api/ui/custom";
import { path } from "@kksh/api/headless";
const videoPath = await path.join(await path.desktopDir(), 'kunkun.mp4')// sample output: /Users/kksh/Desktop/kunkun.mp4
Full List of APIs
The documentation https://docs.api.kunkun.sh/interfaces/index.IPath contains detailed description and examples for each of the following APIs.
-
appCacheDir
-
appConfigDir
-
appDataDir
-
appLocalDataDir
-
appLogDir
-
audioDir
-
BaseDirectory
-
basename
-
cacheDir
-
configDir
-
dataDir
-
delimiter
-
desktopDir
-
dirname
-
documentDir
-
downloadDir
-
executableDir
-
extname
-
fontDir
-
homeDir
-
isAbsolute
-
join
-
localDataDir
-
normalize
-
pictureDir
-
publicDir
-
resolve
-
resolveResource
-
resourceDir
-
runtimeDir
-
sep
-
tempDir
-
templateDir
-
videoDir
-
extensionDir
-
extensionSupportDir