Packages

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

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. dirs
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def cache: Path

    A directory in which to read and write non-essential (cached) data.

  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. 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.

  8. 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.

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. 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.

  14. val name: String
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def productElementNames: Iterator[String]
    Definition Classes
    Product
  19. def runtime: Path

    A directory in which to read and write runtime files, such as sockets and small temporary files.

  20. def state: Path

    A directory for persisting application state.

  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. val system: Boolean
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped