Packages

final class File extends AnyVal

Source
file.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. File
  2. AnyVal
  3. Any
Implicitly
  1. by richDrxAny
  2. by DrxFileToJavaFile
  3. by any2stringadd
  4. by StringFormat
  5. by Ensuring
  6. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new File(file: java.io.File)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. def +(postfix: String): File
  4. def ->[B](y: B): (File, B)
    Implicit
    This member is added by an implicit conversion from File toArrowAssoc[File] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. def /(glob: Glob): Iterator[File]
  6. def /(filename: Symbol): File
  7. def /(filename: String): File
  8. def /(that: File): File
  9. final def ==(that: File): Boolean
  10. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  11. def abs: File
  12. def apply(path: String): File
  13. def applyIf(t: Boolean, f: (File) => File): File
    Implicit
    This member is added by an implicit conversion from File toDrxAny[File] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  14. def applyIf(t: (File) => Boolean)(f: (File) => File): File

    better chaining for types

    better chaining for types

    Implicit
    This member is added by an implicit conversion from File toDrxAny[File] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  15. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  16. def basename: String
  17. def canExecute(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  18. def canRead: Boolean
  19. def canWrite(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  20. def canon: File
  21. def chmod(perm: Int): Unit
  22. def companion(altExt: String): File
  23. def compareTo(arg0: java.io.File): Int
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File → Comparable
  24. def convert[A <: FileKind, B <: FileKind](implicit fc: FileConverter[A, B], ec: drx.EC): drx.Future[File]
  25. def convert[A <: FileKind, B <: FileKind](tgt: File)(implicit fc: FileConverter[A, B], ec: drx.EC): drx.Future[File]
  26. def convertTo(tgt: File)(implicit fcs: FileConverters, ec: drx.EC): drx.Future[File]
  27. def copyTo(that: File): drx.Try[File]

    smart copy, make sure the destination parent directories exist and preserve the src file modification time

  28. def createNewFile(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
    Annotations
    @throws(classOf[java.io.IOException])
  29. def delete: Boolean
  30. def deleteOnExit(): Unit
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  31. def driveSize: Memory
  32. def elementOf(xs: Set[File]): Boolean
    Implicit
    This member is added by an implicit conversion from File toDrxAny[File] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  33. def ensuring(cond: (File) => Boolean, msg: => Any): File
    Implicit
    This member is added by an implicit conversion from File toEnsuring[File] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  34. def ensuring(cond: (File) => Boolean): File
    Implicit
    This member is added by an implicit conversion from File toEnsuring[File] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  35. def ensuring(cond: Boolean, msg: => Any): File
    Implicit
    This member is added by an implicit conversion from File toEnsuring[File] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  36. def ensuring(cond: Boolean): File
    Implicit
    This member is added by an implicit conversion from File toEnsuring[File] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  37. def equals(arg0: AnyRef): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File → AnyRef → Any
  38. def exists(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  39. def expandTilde: File
  40. def ext: String
  41. val file: java.io.File
  42. def fileOption: Option[File]

    provide a monadic expression for the existence of a file

  43. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from File toStringFormat[File] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  44. def getAbsoluteFile(): java.io.File
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  45. def getAbsolutePath(): String
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  46. def getCanonicalFile(): java.io.File
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
    Annotations
    @throws(classOf[java.io.IOException])
  47. def getCanonicalPath(): String
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
    Annotations
    @throws(classOf[java.io.IOException])
  48. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  49. def getFreeSpace(): Long
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  50. def getName(): String
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  51. def getParent(): String
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  52. def getParentFile(): java.io.File
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  53. def getPath(): String
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  54. def getTotalSpace(): Long
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  55. def getUsableSpace(): Long
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  56. def hashCode(): Int
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File → AnyRef → Any
  57. def in: Input
  58. def isAbs: Boolean
  59. def isAbsolute(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  60. def isDir: Boolean
  61. def isDirectory(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  62. def isFile: Boolean
  63. def isHidden: Boolean
  64. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  65. def lastModified(): Long
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  66. def length(): Long
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  67. def list: Iterator[File]

    Smart listing files or directories or cross platform root capabilities

  68. def listFiles(arg0: FileFilter): Array[java.io.File]
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  69. def listFiles(arg0: FilenameFilter): Array[java.io.File]
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  70. def listFiles(): Array[java.io.File]
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  71. def mime: Mime
  72. def mkDir: Option[File]

    ensures a directory can be made successfully

  73. def mkParents: drx.Try[File]

    ensures current file parent directories exist by checking or making them, returns Success[File] if successful This can be used as a sort of monadic wrapper around succesful parents In most cases this removes the need for an explicit mkdir, assuming you should only need a directory if you have a file Note: this assumes a file inside the directory is specified.

    ensures current file parent directories exist by checking or making them, returns Success[File] if successful This can be used as a sort of monadic wrapper around succesful parents In most cases this removes the need for an explicit mkdir, assuming you should only need a directory if you have a file Note: this assumes a file inside the directory is specified. It only makes parent files, not the file itself Note: we need the canonical in system version of the file to make sure the parent directory is really possible on the system

  74. def mkdir(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  75. def mkdirs(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  76. def modified: Date
  77. def modified_=(date: Date): Boolean

    a setter way to set the last modified time, i.e a copy should sometimes do this

  78. def moveTo(that: File): drx.Try[File]
  79. def name: String
  80. def noneIf(f: (File) => Boolean): Option[File]
    Implicit
    This member is added by an implicit conversion from File toDrxAny[File] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  81. def optionIf(f: (File) => Boolean): Option[File]

    optionally wrap an object

    optionally wrap an object

    Implicit
    This member is added by an implicit conversion from File toDrxAny[File] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  82. def orElse(url: URL)(implicit ec: drx.ExecutionContext): drx.Future[File]

    if the file doesn't exist download it

  83. def orElse(that: => Input): Input

    if a file exists use it as an input else use the input.

    if a file exists use it as an input else use the input. This is nice to roll over to resources: File("lost.txt") or IO.resource("found.txt")

  84. def orElse(that: => File): File

    switch to a file or directory that exists else keep the last filename

  85. def out: Output
  86. def outAppend: Output
  87. def parent: Option[File]
  88. def path: String
  89. def preApply[B](f: (File) => B): B

    a preApply f => f(a)

    a preApply f => f(a)

    Implicit
    This member is added by an implicit conversion from File toDrxAny[File] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  90. def relativeTo(that: File): File
  91. def rename(that: File): Option[File]
  92. def renameTo(arg0: java.io.File): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  93. def root: File
  94. def safe: File

    clean the file name to be a safe (without spaces and problematic characters)

  95. def setExecutable(arg0: Boolean): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  96. def setExecutable(arg0: Boolean, arg1: Boolean): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  97. def setLastModified(arg0: Long): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  98. def setReadOnly(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  99. def setReadable(arg0: Boolean): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  100. def setReadable(arg0: Boolean, arg1: Boolean): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  101. def setWritable(arg0: Boolean): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  102. def setWritable(arg0: Boolean, arg1: Boolean): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  103. def sideEffect(f: (File) => Unit): File

    side effect filter

    side effect filter

    Implicit
    This member is added by an implicit conversion from File toDrxAny[File] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  104. def size: Bytes
  105. def someIf(f: (File) => Boolean): Option[File]
    Implicit
    This member is added by an implicit conversion from File toDrxAny[File] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  106. val thisAny: File
    Implicit
    This member is added by an implicit conversion from File toDrxAny[File] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
  107. def toJava: java.io.File
  108. def toPath(): java.nio.file.Path
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  109. def toString(): String

    default to string should be a cross platform representation of path separators Note: the system path form is still returned by _.path

    default to string should be a cross platform representation of path separators Note: the system path form is still returned by _.path

    Definition Classes
    File → Any
  110. def toURI(): URI
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
  111. def unixPath: String
  112. def url: URL
  113. def walk(maxDepth: Int): Iterator[File]

    walk(maxDepth=0) is equivalent to list

  114. def walk: Iterator[File]

    walk is equivalent to walk(maxDepth=0,=>false,0) is equivalent to list

  115. def walk(glob: Glob, maxDepth: Int = 0): Iterator[File]
  116. def walkSkipIf(skipDir: (File) => Boolean): Iterator[File]
  117. def watch(setup: String, recursive: Boolean = false, debounce: Time = 1.s, delay: Time = 20.ms)(func: (File) => Unit)(implicit ec: drx.ExecutionContext): WatchService

    debounce checks fmod and create differences, delay:adds a slight delay before f-execution

  118. def watch(func: (File) => Unit)(implicit ec: drx.ExecutionContext): WatchService

Shadowed Implicit Value Members

  1. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from File toany2stringadd[File] performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (file: any2stringadd[File]).+(other)
    Definition Classes
    any2stringadd
  2. def canRead(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (file: java.io.File).canRead()
    Definition Classes
    File
  3. def delete(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (file: java.io.File).delete()
    Definition Classes
    File
  4. def isFile(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (file: java.io.File).isFile()
    Definition Classes
    File
  5. def isHidden(): Boolean
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (file: java.io.File).isHidden()
    Definition Classes
    File
  6. def list(arg0: FilenameFilter): Array[String]
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (file: java.io.File).list(arg0)
    Definition Classes
    File
  7. def list(): Array[String]
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (file: java.io.File).list()
    Definition Classes
    File
  8. def toString(): String
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (file: java.io.File).toString()
    Definition Classes
    File → AnyRef → Any

Deprecated Value Members

  1. def ?>(f: (File) => Boolean): Option[File]

    alias for option if

    alias for option if

    Implicit
    This member is added by an implicit conversion from File toDrxAny[File] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
    Annotations
    @deprecated
    Deprecated

    (Since version v0.2.15) to many symbols are hard to undertand

  2. def toURL(): java.net.URL
    Implicit
    This member is added by an implicit conversion from File tojava.io.File performed by method DrxFileToJavaFile in cc.drx.predef.Conversions.
    Definition Classes
    File
    Annotations
    @throws(classOf[java.net.MalformedURLException]) @Deprecated
    Deprecated
  3. def |>[B](f: (File) => B): B
    Implicit
    This member is added by an implicit conversion from File toDrxAny[File] performed by method richDrxAny in cc.drx.predef.Enrich.
    Definition Classes
    DrxAny
    Annotations
    @deprecated
    Deprecated

    (Since version v0.2.15) use preApply if you must (symbols are concise without concision)

  4. def [B](y: B): (File, B)
    Implicit
    This member is added by an implicit conversion from File toArrowAssoc[File] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyVal

Inherited from Any

Inherited by implicit conversion richDrxAny fromFile to DrxAny[File]

Inherited by implicit conversion DrxFileToJavaFile fromFile to java.io.File

Inherited by implicit conversion any2stringadd fromFile to any2stringadd[File]

Inherited by implicit conversion StringFormat fromFile to StringFormat[File]

Inherited by implicit conversion Ensuring fromFile to Ensuring[File]

Inherited by implicit conversion ArrowAssoc fromFile to ArrowAssoc[File]

Ungrouped