adds a new child to a given file
adds a new file to the FileSystem with a specific file path
adds a new file to the FileSystem.
adds a new file to the FileSystem. The file path will be a default one
append some content to a file and take care of closing the file.
append some content to a file and take care of closing the file.
Usage:
write("./dir/hello.txt") { out => out.write("content") }
path of the file to write
writes some content to a file.
writes some content to a file.
path of the file to read
content of the file to write
writes some xml content to a file.
writes some xml content to a file.
path of the file to read
content of the file to write
overrides the canRead definition checking in the readableFiles list
overrides the canRead definition checking in the readableFiles list
true if the file can be read
overrides the canWrite definition checking in the writableFiles list
overrides the canWrite definition checking in the writableFiles list
true if the file can be written
this map associates some file paths with children paths
Copy an input stream to an output stream.
Copy an input stream to an output stream.
input stream
output stream
copy the content of a directory to another.
copy the content of a directory to another.
destination directory path
copy a file to a destination directory
copy a file to a destination directory
path of the file to copy
destination directory path
Copy specs resources found either in the specs jar or in the classpath directories to an output directory
Copy specs resources found either in the specs jar or in the classpath directories to an output directory
path of the base package (must not be empty!)
name of the resource directory to copy (relative to the base package)
output directory where to copy the files to
create a new directory
create a new directory
creates a file with the specified path but an empty content
creates a file with the specified path but an empty content
this list registers created directories
default extension which can be used when creating default file names
a default file path. All default file paths will be different from each other
delete a file with the specified path
delete a file with the specified path
true if the file exists
glob expression, for example: ./dir/**/*.xml
all file paths
this map associates some file paths with file contents
the path of a File relative to a base file
the file absolute path
the file canonical path
the file name
the file parent path
a mock FileWriter for a specific path
the regular expression equivalent to a glob pattern (see the specs for Fragments)
a FileInputStream for a given file path
overrides the isAbsolute definition checking if it starts with / (partial definition)
overrides the isAbsolute definition checking if it starts with / (partial definition)
true if the file is absolute
true if the File represented by this path is a directory
overrides the isDirectory definition checking if it ends with / (partial definition)
overrides the isDirectory definition checking if it ends with / (partial definition)
true if the file is a directory
overrides the isFile definition checking if it doesn't end with / (partial definition)
overrides the isFile definition checking if it doesn't end with / (partial definition)
true if the file is a file
overrides the isHidden definition checking if it starts with .
overrides the isHidden definition checking if it starts with . (partial definition)
true if the file is hidden
overrides the listFiles definition
overrides the listFiles definition
the files of that directory
the xml content of a file using the Xhtml parser
if the file contains several nodes, it wraps them up in a single artificial node
the xml content of a file, using the XML parser
the MD5 hash of a file
create a new directory
create a new directory
the bytes of a file
the path of the file to read
the content of a file corresponding to a given path
the content of a file corresponding to a given path
this list stores readable files
deletes the directory and all directory content at the specified path and return the parent path of that directory
deletes the directory and all directory content at the specified path and return the parent path of that directory
removes all specified files
true if 2 paths are the same according to their canonical representation
sets a file as not readable
sets a file as not writable
sets a file as readable
sets a file as writable
this list stores writable files
writes some content to a file and take care of closing the file.
writes some content to a file and take care of closing the file.
Usage:
write("./dir/hello.txt") { out => out.write("content") }
path of the file to write
writes some content to a file.
writes some content to a file.
path of the file to read
content of the file to write
writes some xml content to a file.
writes some xml content to a file.
path of the file to read
content of the file to write
The MockFileSystem trait mocks the FileSystem by storing a Map[path, content] representing the content of the FileSystem