PathMatchers

The PathMatchers trait provides matchers which are applicable to strings representing paths

Companion:
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def beADirectoryPath: PathMatcher

matches if new File(path).isDirectory

matches if new File(path).isDirectory

def beAFilePath: PathMatcher

matches if new File(path).isFile

matches if new File(path).isFile

def beAHiddenPath: PathMatcher

matches if new File(path).isHidden

matches if new File(path).isHidden

def beAReadablePath: PathMatcher

matches if new File(path).canRead

matches if new File(path).canRead

def beAWritablePath: PathMatcher

matches if new File(path).canWrite

matches if new File(path).canWrite

def beAnAbsolutePath: PathMatcher

matches if new File(path).isAbsolute

matches if new File(path).isAbsolute

def beAnExistingPath: PathMatcher

matches if new File(path).exists

matches if new File(path).exists

def beEqualToIgnoringSep(other: String): PathMatcher

matches if 2 paths are the same regardless of their separators

matches if 2 paths are the same regardless of their separators

def haveAsAbsolutePath(path: String): PathMatcher

matches if new File(path).getAbsolutePath == absolutePath

matches if new File(path).getAbsolutePath == absolutePath

def haveAsCanonicalPath(path: String): PathMatcher

matches if new File(path).getCanonicalPath == canonicalPath

matches if new File(path).getCanonicalPath == canonicalPath

def haveParentPath(parent: String): PathMatcher

matches if new File(path).getParent == parent

matches if new File(path).getParent == parent

def havePathName(name: String): PathMatcher

matches if new File(path).getName == name

matches if new File(path).getName == name

def listPaths(list: String*): PathMatcher

matches if new File(path).list == list(files)

matches if new File(path).list == list(files)