class Path extends AnyRef

The Path constructor is private so we can enforce some semantics regarding how a Path might relate to the world.

Note: This library is considered experimental and should not be used unless you know what you are doing.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Path
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def /(child: File): File
  4. def /(child: Directory): Directory
  5. def /(child: Path): Path

    Creates a new Path with the specified path appended.

    Creates a new Path with the specified path appended. Assumes the type of the new component implies the type of the result.

  6. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. def addExtension(ext: String): Path
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def canRead: Boolean
  10. def canWrite: Boolean
  11. def changeExtension(ext: String): Path
  12. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  13. def createDirectory(force: Boolean = true, failIfExists: Boolean = false): Directory
  14. def createFile(failIfExists: Boolean = false): File
  15. def delete(): Boolean
  16. def deleteRecursively(): Boolean

    Deletes the path recursively.

    Deletes the path recursively. Returns false on failure. Use with caution!

  17. def endsWith(other: Path): Boolean
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(other: Any): Boolean
    Definition Classes
    Path → AnyRef → Any
  20. def exists: Boolean
  21. def extension: String
  22. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  24. def hasExtension(ext: String, exts: String*): Boolean
  25. def hashCode(): Int
    Definition Classes
    Path → AnyRef → Any
  26. def ifDirectory[T](f: (Directory) ⇒ T): Option[T]
  27. def ifFile[T](f: (File) ⇒ T): Option[T]
  28. def isAbsolute: Boolean
  29. def isDirectory: Boolean
  30. def isEmpty: Boolean
  31. def isFile: Boolean
  32. def isFresher(other: Path): Boolean
  33. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  34. def isSame(other: Path): Boolean
  35. val jfile: java.io.File
  36. def lastModified: Long
  37. def length: Long
  38. def name: String
  39. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. def normalize: Path
  41. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  42. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  43. def parent: Directory

    returns

    The path of the parent directory, or root if path is already root

  44. def parents: List[Directory]
  45. def path: String
  46. def relativize(other: Path): Path
  47. def resolve(other: Path): Path
  48. def segments: List[String]
  49. val separator: Char
  50. val separatorStr: String
  51. def stripExtension: String
  52. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  53. def toAbsolute: Path
  54. def toAbsoluteWithRoot(root: Path): Path

    If this path is absolute, returns it: otherwise, returns an absolute path made up of root / this.

  55. def toCanonical: Path
  56. def toDirectory: Directory
  57. def toFile: File
  58. def toString(): String
    Definition Classes
    Path → AnyRef → Any
  59. def toURI: URI
  60. def toURL: URL
  61. def truncate(): Boolean
  62. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  65. def walk: Iterator[Path]

    Equivalent to walkFilter(_ => true).

  66. def walkFilter(cond: (Path) ⇒ Boolean): Iterator[Path]

    If this path is a directory, recursively iterate over its contents.

    If this path is a directory, recursively iterate over its contents. The supplied condition is a filter which is applied to each element, with that branch of the tree being closed off if it is false. So for example if the condition is false for some subdirectory, nothing under that directory will be in the Iterator. If it's true, all files for which the condition holds and are directly in that subdirectory are in the Iterator, and all sub-subdirectories are recursively evaluated

Inherited from AnyRef

Inherited from Any

Ungrouped