| OVERVIEW | PACKAGE | CONSTR | FIELDS | METHODS | FRAMES NO FRAMES | INHERITED |
trait FileMatchers
extends
PathMatchers
FileMatchers trait provides matchers which are applicable to files
| != |
final def !=(arg0 : Any)
|
Boolean | Any |
| != |
final def !=(arg0 : Object)
|
Boolean | AnyRef |
| == |
final def ==(arg0 : Object)
|
Boolean | AnyRef |
| == |
final def ==(arg0 : Any)
|
Boolean | Any |
| asInstanceOf |
final def asInstanceOf[T0]
|
T0 | Any |
| asPath |
implicit def asPath(p : String)
transforms a string as a Path object to allow matches like:
"c:/projects"
[details]
path must exist
|
Path | |
| beADirectoryPath |
def beADirectoryPath[T <: String]
Matches if new File(path)
[details]
isDirectory
|
Matcher[T] | PathMatchers |
| beAFilePath |
def beAFilePath[T <: String]
Matches if new File(path)
[details]
isFile
|
Matcher[T] | PathMatchers |
| beAHiddenPath |
def beAHiddenPath[T <: String]
Matches if new File(path)
[details]
isHidden
|
Matcher[T] | PathMatchers |
| beAReadablePath |
def beAReadablePath[T <: String]
Matches if new File(path)
[details]
canRead
|
Matcher[T] | PathMatchers |
| beAWritablePath |
def beAWritablePath[T <: String]
Matches if new File(path)
[details]
canWrite
|
Matcher[T] | PathMatchers |
| beAbsolute |
def beAbsolute[T <: Object]
Matches if file
[details]
isAbsolute
|
Matcher[T] | |
| beAnAbsolutePath |
def beAnAbsolutePath[T <: String]
Matches if new File(path)
[details]
isAbsolute
|
Matcher[T] | PathMatchers |
| beAnExistingPath |
def beAnExistingPath[T <: String]
Matches if new File(path)
[details]
exists
|
Matcher[T] | PathMatchers |
| beDirectory |
def beDirectory[T <: Object]
Matches if file
[details]
isDirectory
|
Matcher[T] | |
| beEqualIgnoringSep |
def beEqualIgnoringSep[T <: String](other : String)
Matches if 2 paths are the same regardless of their separators
[details]
|
Matcher[Nothing] | PathMatchers |
| beEqualToIgnoringSep |
def beEqualToIgnoringSep[T <: String](other : String)
Matches if 2 paths are the same regardless of their separators
|
Matcher[T] | PathMatchers |
| beFile |
def beFile[T <: Object]
Matches if file
[details]
isFile
|
Matcher[T] | |
| beHidden |
def beHidden[T <: Object]
Matches if file
[details]
isHidden
|
Matcher[T] | |
| beReadable |
def beReadable[T <: Object]
Matches if file
[details]
canRead
|
Matcher[T] | |
| beWritable |
def beWritable[T <: Object]
Matches if file
[details]
canWrite
|
Matcher[T] | |
| canRead |
def canRead(path : String)
[details]
|
Boolean | FileSystem |
| canWrite |
def canWrite(path : String)
[details]
|
Boolean | FileSystem |
| clone |
protected def clone
|
Object | AnyRef |
| copy |
def copy(input : InputStream, output : OutputStream)
Copy an input stream to an output stream
[details]
|
Unit | FileSystem |
| copyDir |
def copyDir(url : URL, dest : String, tagged : Tagged)
copy the content of a directory to another
[details]
|
Unit | FileSystem |
| copyDir |
def copyDir(src : String, dest : String, tagged : Tagged)
copy the content of a directory to another
[details]
|
Unit | FileSystem |
| copyDir |
def copyDir(url : URL, dest : String)
copy the content of a directory to another
[details]
|
Unit | FileSystem |
| copyDir |
def copyDir(src : String, dest : String)
copy the content of a directory to another
[details]
|
Unit | FileSystem |
| copyFile |
def copyFile(path : String, dest : String)
Copy the content of a directory to another
[details]
|
Unit | FileSystem |
| copySpecResourcesDir |
def copySpecResourcesDir(src : String, outputDir : String)
Copy specs resources found either in the specs jar or in the classpath directories to an output directory
[details]
Current limitations!! This only works if the jar holding the resources contains the word "specs".
|
Unit | FileSystem |
| createDir |
def createDir(path : String)
creates a directory for a given path
|
Boolean | FileSystem |
| createFile |
def createFile(path : String)
creates a file for a given path
[details]
Create the parent directory if necessary.
|
Unit | FileWriter |
| eq |
final def eq(arg0 : Object)
|
Boolean | AnyRef |
| equals |
def equals(arg0 : Any)
|
Boolean | AnyRef |
| exist |
def exist[T <: Object]
Matches if file
[details]
exists
|
Matcher[T] | |
| existPath |
def existPath[T <: String]
alias for beAnExistingFile
|
Matcher[T] | PathMatchers |
| exists |
def exists(path : String)
[details]
|
Boolean | FileSystem |
| filePaths |
def filePaths(path : String)
[details]
|
List[String] | FileSystem |
| finalize |
protected def finalize
|
Unit | AnyRef |
| getAbsolutePath |
def getAbsolutePath(path : String)
[details]
|
String | FileSystem |
| getCanonicalPath |
def getCanonicalPath(path : String)
[details]
|
String | FileSystem |
| getClass |
final def getClass
|
Class[Object] | AnyRef |
| getName |
def getName(path : String)
[details]
|
String | FileSystem |
| getParent |
def getParent(path : String)
[details]
|
String | FileSystem |
| getResourcesNamed |
def getResourcesNamed(name : String)
Return urls of the resources containing the name "name" from this ClassLoader and the System classLoader
[details]
|
List[URL] | FileSystem |
| getWriter |
def getWriter(path : String)
The getWriter function can be overriden to provide a mock writer writing to the console for example
[details]
|
Writer | FileWriter |
| globToPattern |
def globToPattern(glob : String)
[details]
|
String | FileSystem |
| hashCode |
def hashCode
|
Int | AnyRef |
| haveAbsolutePath |
def haveAbsolutePath[T <: Object](path : String)
Matches if file
[details]
getAbsolutePath == path
|
Matcher[T] | |
| haveAsAbsolutePath |
def haveAsAbsolutePath[T <: String](absolutePath : String)
Matches if new File(path)
[details]
getAbsolutePath == absolutePath
|
Matcher[T] | PathMatchers |
| haveAsCanonicalPath |
def haveAsCanonicalPath[T <: String](canonicalPath : String)
Matches if new File(path)
[details]
getCanonicalPath == canonicalPath
|
Matcher[T] | PathMatchers |
| haveCanonicalPath |
def haveCanonicalPath[T <: Object](path : String)
Matches if file
[details]
getCanonicalPath == path
|
Matcher[T] | |
| haveList |
def haveList[T <: Object](list : String)
Matches if file
[details]
list == list
|
Matcher[T] | |
| haveName |
def haveName[T <: Object](name : String)
Matches if file
[details]
getName == name
|
Matcher[T] | |
| haveParent |
def haveParent[T <: Object](path : String)
Matches if file
[details]
getParent == path
|
Matcher[T] | |
| haveParentPath |
def haveParentPath[T <: String](parent : String)
Matches if new File(path)
[details]
getParent == parent
|
Matcher[T] | PathMatchers |
| havePathName |
def havePathName[T <: String](name : String)
Matches if new File(path)
[details]
getName == name
|
Matcher[T] | PathMatchers |
| isAbsolute |
def isAbsolute(path : String)
[details]
|
Boolean | FileSystem |
| isDir |
def isDir(path : String)
[details]
|
Boolean | FileSystem |
| isDirectory |
def isDirectory(path : String)
[details]
|
Boolean | FileSystem |
| isEqualIgnoringSep |
def isEqualIgnoringSep[T <: String](path : T, other : String)
[details]
|
Boolean | PathMatchers |
| isFile |
def isFile(path : String)
[details]
|
Boolean | FileSystem |
| isHidden |
def isHidden(path : String)
[details]
|
Boolean | FileSystem |
| isInstanceOf |
final def isInstanceOf[T0]
|
Boolean | Any |
| listFiles |
def listFiles(path : String)
[details]
|
List[String] | FileSystem |
| listPaths |
def listPaths[T <: String](list : String*)
Matches if new File(path)
[details]
list == list(files)
|
Matcher[T] | PathMatchers |
| mkdirs |
def mkdirs(path : String)
creates a new directory
|
Boolean | FileWriter |
| ne |
final def ne(arg0 : Object)
|
Boolean | AnyRef |
| notify |
final def notify
|
Unit | AnyRef |
| notifyAll |
final def notifyAll
|
Unit | AnyRef |
| readFile |
def readFile(path : String)
reads the content of a file
[details]
|
String | FileReader |
| removeDir |
def removeDir(path : String)
deletes the directory and all directory contents at the specified path and return the parent path of that directory
|
String | FileSystem |
| synchronized |
final def synchronized[T0](arg0 : T0)
|
T0 | AnyRef |
| toString |
def toString
|
String | AnyRef |
| unjar |
def unjar(path : String, dest : String)
Unjar the jar (or zip file) specified by "path" to the "dest" directory
[details]
|
Unit | FileSystem |
| unjar |
def unjar(path : String, dirPath : String, regexFilter : String)
Unjar the jar (or zip file) specified by "path" to the "dest" directory
[details]
Filters files which shouldn't be extracted with a regular expression.
|
Unit | FileSystem |
| wait |
final def wait
|
Unit | AnyRef |
| wait |
final def wait(arg0 : Long)
|
Unit | AnyRef |
| wait |
final def wait(arg0 : Long, arg1 : Int)
|
Unit | AnyRef |
| write |
def write(path : String)(function : (Writer) => Unit)
writes some content to a file and take care of closing the file
[details]
Usage:
write("./dir/hello.txt") { out =>
out.write("content")
}
|
Unit | FileWriter |
| writeFile |
def writeFile(path : String, content : => String)
writes some content to a file
[details]
|
Unit | FileWriter |
| OVERVIEW | PACKAGE | CONSTR | FIELDS | METHODS | FRAMES NO FRAMES | INHERITED |