Skip to content

AppDirs

[Source]

class ref AppDirs

Constructors

create

[Source]

An AppDirs instance derives the platform specific directories from the process environment variables. It will return appdirs for the user of the current process.

Creating appdirs requires: - passing environment variables, only on unix and osx systems. - a name of the app you want to get directories for - optionally: a name of the app author (be it a company or a person) - optionally: a version of your app, if you want to separate directories also by version

new ref create(
  env_vars: (Array[String val] box | None val),
  app_name: String val,
  app_author: (String val | None val) = reference,
  app_version: (String val | None val) = reference,
  roaming: Bool val = false,
  osx_as_unix: Bool val = false)
: AppDirs ref^

Parameters

Returns


Public Functions

user_home_dir

[Source]

fun box user_home_dir()
: String val ?

Returns


user_data_dir

[Source]

Returns the full path to the user-specific data dir for this application.

fun box user_data_dir()
: String val ?

Returns


site_data_dirs

[Source]

Returns an array of full paths to the user-shared data dirs for this application.

fun box site_data_dirs()
: Array[String val] val ?

Returns


user_config_dir

[Source]

Return full path to the user-specific config dir for this application.

fun box user_config_dir()
: String val ?

Returns


site_config_dirs

[Source]

Return full path to the user-shared config dirs for this application.

fun box site_config_dirs()
: Array[String val] val ?

Returns


user_cache_dir

[Source]

Return full path to the user-specific cache dir for this application.

fun box user_cache_dir()
: String val ?

Returns


user_state_dir

[Source]

Return full path to the user-specific state dir for this application.

See https://wiki.debian.org/XDGBaseDirectorySpecification#state

fun box user_state_dir()
: String val ?

Returns


user_log_dir

[Source]

Return full path to the user-specific log dir for this application.

fun box user_log_dir()
: String val ?

Returns