scalax.file

Path

object Path extends AnyRef

The object for constructing Path objects and for containing implicits from strings and java.file.Files to Scala paths.

All Paths constructed by this factory are created for the default filesystem

Since

0.1

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Path
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. type Closeable = AnyRef { def close(): Unit }

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. object AccessModes extends AnyRef

    Enumeration of the Access modes possible for accessing files

  7. def apply (jfile: File): Path

    Create a Path on the default files system from a java.file.File

  8. def apply (uri: URI): Option[Path]

    Create a Path from a URI.

    Create a Path from a URI.

    both the filesystem and the path can be determined from from the uri. For example:

    • file://c:\dir will create an absolute Path from the default filesystem with the Path = c:\dir
    • jar://classes.jar!dir creates a Path to the dir directory in the jar filesystem classes.jar
    uri

    The uri specifying the filesystem and path @return A path object

  9. def apply (path: String*)(implicit fileSystem: FileSystem = FileSystem.default): Path

  10. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  11. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. def createTempDirectory (prefix: String = FileSystem.default.randomPrefix, suffix: String = null, dir: String = null, deleteOnExit: Boolean = true, attributes: Iterable[scalax.file.attributes.FileAttribute[_]] = Nil)(implicit fileSystem: FileSystem = FileSystem.default): Path

    Creates an empty directory in the provided directory with the provided prefix and suffixes.

    Creates an empty directory in the provided directory with the provided prefix and suffixes. The directory will not replace an existing file/directory and it is guaranteed to be unique and not previously used by another process at time of creation.

    prefix

    the starting characters of the directory name. Default is a randomly generated prefix

    suffix

    the last characters of the directory name Default is null (no suffix)

    dir

    the directory to create the directory in. If null or not declared the directory will be created in the system temporary folder Default is null (system/user temp folder)

    deleteOnExit

    If true then the directory and all contained folders will be deleted when the JVM is shutdown. Default is true

    attributes

    The attributes to create on the file. Default is Nil(default system file attributes)

  13. def createTempFile (prefix: String = FileSystem.default.randomPrefix, suffix: String = null, dir: String = null, deleteOnExit: Boolean = true, attributes: Iterable[scalax.file.attributes.FileAttribute[_]] = Nil)(implicit fileSystem: FileSystem = FileSystem.default): Path

    Creates an empty file in the provided directory with the provided prefix and suffixes.

    Creates an empty file in the provided directory with the provided prefix and suffixes. The file will not replace an existing file and it is guaranteed to be unique and not previously used by another process at time of creation.

    prefix

    the starting characters of the file name. Default is a randomly generated prefix

    suffix

    the last characters of the file name Default is null (no suffix)

    dir

    the directory to create the file in. If null or not declared the file will be created in the system temporary folder Default is null (system/user temp folder)

    deleteOnExit

    If true then the file will be deleted when the JVM is shutdown Default is true

    attributes

    The attributes to create on the file. Default is Nil(default system file attributes)

    fileSystem

    the filesystem that will create the temporary object Default is the default filesystem

  14. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  15. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  16. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  17. def fromString (path: String)(implicit fileSystem: FileSystem = FileSystem.default): Path

    Create a Path from a string

    Create a Path from a string

    path

    the string to use for creating the Path

  18. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  19. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  20. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  21. implicit def jfile2path (jfile: File): Path

    Method to implicitly convert a java.file.File to a Path object

    Method to implicitly convert a java.file.File to a Path object

    Attributes
    implicit
  22. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  23. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  24. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  25. def roots : List[Path]

    Lists the roots of the default filesystem

  26. implicit def string2path (s: String)(implicit fileSystem: FileSystem = FileSystem.default): Path

    Method to implicitly convert a string to a Path object

    Method to implicitly convert a string to a Path object

    Attributes
    implicit
  27. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  28. def toString (): String

    Definition Classes
    AnyRef → Any
  29. def unapply (pathExpr: Path): Option[String]

    Allows matching on the full path of a Path

    Allows matching on the full path of a Path

    The match must be exact and in the same case as the path but the / and \ are interchangeable

    
    Path("c:/dir/file")
    Path("c:\\dir\\file")
    
    
    both of the above examples will match the same path

    For more on matching Paths see Path.Matching

  30. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  31. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  32. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any