implicit final class RichFile extends AnyVal
- Alphabetic
- By Inheritance
- RichFile
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
def
/(child: String): File
Constructs a sub-file of this file by appending a new path component.
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
- def absolute: File
-
def
absolutePath: String
The string representation of the absolute location of this file.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
base: String
Returns the name part of the file and drops the extension (if any).
-
def
baseAndExt: (String, String)
Returns a tuple consisting of the file's name (without extension), and the extension (period dropped).
-
def
children(filter: (File) ⇒ Boolean): IndexedSeq[File]
Lists all children of this directory which satisfy a predicate.
Lists all children of this directory which satisfy a predicate. Returns an empty sequence if this file does not denote a directory.
- filter
a filter predicate to select children
-
def
children: IndexedSeq[File]
Lists all children of this directory.
Lists all children of this directory. Returns an empty sequence if this file does not denote a directory.
-
def
ext: String
Returns the extension of the file (period dropped).
Returns the extension of the file (period dropped). Returns and empty string if no extension is given.
-
def
extL: String
Returns the extension of the file (period dropped) in lower case letters.
Returns the extension of the file (period dropped) in lower case letters. Returns and empty string if no extension is given.
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
name: String
Returns the name part of the file.
- def parent: File
- def parentOption: Option[File]
-
def
path: String
The string representation of this file.
- val peer: File
-
def
relativize(parent: File): File
Creates from this file a new file instance relative to a given
parentdirectory.Creates from this file a new file instance relative to a given
parentdirectory. Throws an exception if ifparentdoes not constitute a parent directory. -
def
relativizeOption(parent: File): Option[File]
Creates from this file a new file instance relative to a given
parentdirectory.Creates from this file a new file instance relative to a given
parentdirectory.- returns
Someif this file is relative toparent,Noneifparentdoes not constitute a parent directory
-
def
replaceExt(s: String): File
Replaces the extension by a given string.
Replaces the extension by a given string. If the file did not have any extension, it will be added by this call.
- s
the extension to use in replacement. May or may not contain a leading period.
-
def
replaceName(s: String): File
Replaces the name part of this file, keeping the parent directory.
-
def
toString(): String
- Definition Classes
- Any