final class File extends AnyVal
- Source
- file.scala
- Alphabetic
- By Inheritance
- File
- AnyVal
- Any
- by richDrxAny
- by DrxFileToJavaFile
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new File(file: java.io.File)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- def +(postfix: String): File
- def ->[B](y: B): (File, B)
- def /(glob: Glob): Iterator[File]
- def /(filename: Symbol): File
- def /(filename: String): File
- def /(that: File): File
- final def ==(that: File): Boolean
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- def abs: File
- def apply(path: String): File
- 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
- 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def basename: String
- 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
- def canRead: Boolean
- 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
- def canon: File
- def chmod(perm: Int): Unit
- def companion(altExt: String): File
- 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
- def convert[A <: FileKind, B <: FileKind](implicit fc: FileConverter[A, B], ec: drx.EC): drx.Future[File]
- def convert[A <: FileKind, B <: FileKind](tgt: File)(implicit fc: FileConverter[A, B], ec: drx.EC): drx.Future[File]
- def convertTo(tgt: File)(implicit fcs: FileConverters, ec: drx.EC): drx.Future[File]
- def copyTo(that: File): drx.Try[File]
smart copy, make sure the destination parent directories exist and preserve the src file modification time
- 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])
- def delete: Boolean
- 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
- def driveSize: Memory
- 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
- def ensuring(cond: (File) => Boolean, msg: => Any): File
- def ensuring(cond: (File) => Boolean): File
- def ensuring(cond: Boolean, msg: => Any): File
- def ensuring(cond: Boolean): File
- 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
- 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
- def expandTilde: File
- def ext: String
- val file: java.io.File
- def fileOption: Option[File]
provide a monadic expression for the existence of a file
- def formatted(fmtstr: String): String
- 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
- 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
- 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])
- 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])
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- def in: Input
- def isAbs: Boolean
- 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
- def isDir: Boolean
- 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
- def isFile: Boolean
- def isHidden: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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
- 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
- def list: Iterator[File]
Smart listing files or directories or cross platform root capabilities
- 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
- 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
- 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
- def mime: Mime
- def mkDir: Option[File]
ensures a directory can be made successfully
- 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
- 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
- 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
- def modified: Date
- def modified_=(date: Date): Boolean
a setter way to set the last modified time, i.e a copy should sometimes do this
- def moveTo(that: File): drx.Try[File]
- def name: String
- 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
- 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
- def orElse(url: URL)(implicit ec: drx.ExecutionContext): drx.Future[File]
if the file doesn't exist download it
- 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")
- def orElse(that: => File): File
switch to a file or directory that exists else keep the last filename
- def out: Output
- def outAppend: Output
- def parent: Option[File]
- def path: String
- 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
- def relativeTo(that: File): File
- def rename(that: File): Option[File]
- 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
- def root: File
- def safe: File
clean the file name to be a safe (without spaces and problematic characters)
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- def size: Bytes
- 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
- 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
- def toJava: java.io.File
- 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
- 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
- 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
- def unixPath: String
- def url: URL
- def walk(maxDepth: Int): Iterator[File]
walk(maxDepth=0) is equivalent to list
- def walk: Iterator[File]
walk is equivalent to walk(maxDepth=0,=>false,0) is equivalent to list
- def walk(glob: Glob, maxDepth: Int = 0): Iterator[File]
- def walkSkipIf(skipDir: (File) => Boolean): Iterator[File]
- 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
- def watch(func: (File) => Unit)(implicit ec: drx.ExecutionContext): WatchService
Shadowed Implicit Value Members
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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)
- 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.