Asserts that it will be possible to write to a file at Path, possibly after creating parent directories.
Asserts that it will be possible to write to a file at Path, possibly after creating parent directories.
the path to check
if true (default) the file or its direct parent must exist, if false then only require that the first parent that actually exists is writable
Asserts that it will be possible to write to a file at Path, possibly after creating parent directories.
Asserts that it will be possible to write to a file at Path, possibly after creating parent directories.
one or more paths to check
if true (default) the file or its direct parent must exist, if false then only require that the first parent that actually exists is writable
Asserts that the Path represents a directory that can be listed.
Asserts that the Paths represent directories that can be listed.
Asserts that the Paths represents files that can be opened and read.
Asserts that the Path represents a file that can be opened and read.
Asserts that a path represents an existing directory and that new files can be created within the directory.
Asserts that a path represents an existing directory and that new files can be created within the directory.
How large a buffer should be used when buffering operations.
Makes a new temporary directory.
Makes a new temporary file.
Method that attempts to create a directory and all it's parents.
Method that attempts to create a directory and all it's parents.
true if the directory exists after the call, false otherwise
Creates an object that will asynchronously read character data from a stream and pipe it into a sink function.
Finds a resource with a given name on the classpath and produces an array of the bytes from the resource.
Finds a resource with a given name on the classpath and produces an array of the bytes from the resource.
The way resources are traditionally loaded from the class path via Class.getResource()
and
ClassLoader.getResource()
have confusing behaviour. Notably:
* Class.getResource() interprets paths as relative, and requires a leading /
to make them absolute
* ClassLoader.getResource() interprets all paths a absolute and fails on leading /
s
The implementation here first tries Class.getResource
and then ClassLoader.getResource
to enable it to
find relative paths and also absolute paths with and without leading /s
.
Reads the path provides and produces an iterator of lines of text from the file.
Reads the path provides and produces an iterator of lines of text from the file. The underlying file handle will not be closed until the end of the iterator is reached.
Finds a resource with a given name on the classpath and produces an iterator of lines of text from the resource.
Finds a resource with a given name on the classpath and produces an iterator of lines of text from the resource.
The way resources are traditionally loaded from the class path via Class.getResource()
and
ClassLoader.getResource()
have confusing behaviour. Notably:
* Class.getResource() interprets paths as relative, and requires a leading /
to make them absolute
* ClassLoader.getResource() interprets all paths a absolute and fails on leading /
s
The implementation here first tries Class.getResource
and then ClassLoader.getResource
to enable it to
find relative paths and also absolute paths with and without leading /s
.
Creates a new InputStream to read from the supplied path.
Creates a new BufferedReader to read from the supplied path.
Creates a new BufferedReader to read from the supplied path.
Constructs a scala Source object from the path, in a way that will correctly close the source on close()
.
Creates a new BufferedWriter to write to the supplied path.
Writes one or more lines to a file represented by a path.
Trait that can be mixed in to make an Io utility object, and can be re-used elsewhere.