Skip to content
Kunkun

Path

Docs: https://docs.api.kunkun.sh/interfaces/ui.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/worker"
// or
import { path } from "@kksh/api/ui/iframe"
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/ui.IPath contains detailed description and examples for each of the following APIs.

  • BaseDirectory
  • appCacheDir
  • appConfigDir
  • appDataDir
  • appLocalDataDir
  • appLogDir
  • audioDir
  • 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