FileReader

org.specs2.io.FileReader
See theFileReader companion object
trait FileReader

The FileReader trait provides most of the File API methods as an interface in order to be able to mock them

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object FileReader.type

Members list

Value members

Concrete methods

def canRead(path: String): Boolean

Attributes

Returns

true if the file can be read

def canWrite(path: String): Boolean

Attributes

Returns

true if the file can be written

def exists(path: String): Boolean

Attributes

Returns

true if the file exists

def getAbsolutePath(path: String): String

Attributes

Returns

the file absolute path

def getCanonicalPath(path: String): String

Attributes

Returns

the file canonical path

def getName(path: String): String

Attributes

Returns

the file name

def getParent(path: String): String

Attributes

Returns

the file parent path

def isAbsolute(path: String): Boolean

Attributes

Returns

true if the file is absolute

def isDirectory(path: String): Boolean

Attributes

Returns

true if the file is a directory

def isFile(path: String): Boolean

Attributes

Returns

true if the file is a file

def isHidden(path: String): Boolean

Attributes

Returns

true if the file is hidden

def listFiles(path: String): List[String]

Attributes

Returns

the files of that directory