case class dirs(name: String, system: Boolean = false) extends Product with Serializable
Common directories for an application of a given name.
The directories here are implemented as a mix of the XDG Base Directory Specification, macOS adaptations and a fallback to classic unix directories for system applications.
Applications are encouraged to use these directories instead of creating their own hierarchies. They are particularly well-suited for use as parameter defaults, for example:
val parser = cmdr.ArgParser()
val cache = parser.param[os.Path](
"--cache-dir",
default = cmdr.dirs("myapp").cache
- name
the name of the application
- system
use system-wide paths instead of user-specific ones
- Annotations
- @deprecated
- Deprecated
(Since version 0.10.3) use userdirs for user-specific directories, and the FHS standard for system dirs
- Alphabetic
- By Inheritance
- dirs
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new dirs(name: String, system: Boolean = false)
- name
the name of the application
- system
use system-wide paths instead of user-specific ones
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cache: Path
A directory in which to read and write non-essential (cached) data.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def config: List[Path]
A list of preference ordered directories relative to which configuration files should be searched.
A list of preference ordered directories relative to which configuration files should be searched.
This list is guaranteed to have at least one element. The head directory may be used for writing.
- def data: List[Path]
A list of preference ordered directories relative to which data files should be searched.
A list of preference ordered directories relative to which data files should be searched.
This list is guaranteed to have at least one element. The head directory may be used for writing.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def log: Path
A directory for storing log files.
A directory for storing log files.
Note: in general, the logging system should not be a concern of the application itself, and hence this directory should not be used. The way logs are collected will vary depending on the deployment, hence the most portable way to log diagnostic messages is to simply write them to stderr.
- val name: String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def runtime: Path
A directory in which to read and write runtime files, such as sockets and small temporary files.
- def state: Path
A directory for persisting application state.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val system: Boolean
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()