sbt

object FileUtilities

[source: sbt/FileUtilities.scala]

object FileUtilities
extends AnyRef
A collection of file related methods.
Value Summary
val Newline : java.lang.String
lazy val scalaCompilerJar : java.io.File
lazy val scalaLibraryJar : java.io.File
val temporaryDirectory : java.io.File
The directory in which temporary files are placed.
Method Summary
def append (file : java.io.File, content : java.lang.String, charset : java.nio.charset.Charset, log : Logger) : scala.Option[java.lang.String]
Appends the given String content to the provided file using the given encoding. A new file is created if it does not exist.
def append (file : java.io.File, content : java.lang.String, log : Logger) : scala.Option[java.lang.String]
Appends the given String content to the provided file using the default encoding. A new file is created if it does not exist.
def append (file : java.io.File, bytes : scala.Array[Byte], log : Logger) : scala.Option[java.lang.String]
Appends the given bytes to the given file.
def appendStream (file : java.io.File, log : Logger)(f : (java.io.OutputStream) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens an OutputStream on the given file with append=true and passes the stream to the provided function. The stream is closed before this function returns.
def classLocation [T](implicit mf : scala.reflect.Manifest[T]) : java.net.URL
def classLocation (cl : java.lang.Class[Any]) : java.net.URL
def classLocationFile [T](implicit mf : scala.reflect.Manifest[T]) : java.io.File
def classLocationFile (cl : java.lang.Class[Any]) : java.io.File
def clean (files : scala.Iterable[Path], quiet : Boolean, log : Logger) : scala.Option[java.lang.String]
Deletes the given files recursively. quiet determines the logging level. If it is true, each file in files is logged at the info level. If it is false, the debug level is used.
def clean (files : scala.Iterable[Path], log : Logger) : scala.Option[java.lang.String]
Deletes the given files recursively.
def clean (file : Path, log : Logger) : scala.Option[java.lang.String]
Deletes the given file recursively.
def copy (sources : scala.Iterable[Path], destinationDirectory : Path, overwrite : Boolean, preserveLastModified : Boolean, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Copies the files declared in sources to the destinationDirectory directory. Directories are not recursively entered. The destination hierarchy matches the source paths relative to any base directories. For example: A source (basePath ##) / x / y is copied to destinationDirectory / x / y.
def copy (sources : scala.Iterable[Path], destinationDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Equivalent to {@code copy(sources, destinationDirectory, false, log)}.
def copy (sources : scala.Iterable[Path], destinationDirectory : Path, overwrite : Boolean, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Equivalent to {@code copy(sources, destinationDirectory, overwrite, false, log)}.
def copyDirectory (source : Path, target : Path, log : Logger) : scala.Option[java.lang.String]
Copies the contents of the source directory to the target directory .
def copyDirectory (source : java.io.File, target : java.io.File, log : Logger) : scala.Option[java.lang.String]
Copies the contents of the source directory to the target directory .
def copyFile (sourceFile : java.io.File, targetFile : java.io.File, log : Logger) : scala.Option[java.lang.String]
Copies sourceFile to targetFile. If targetFile exists, it is overwritten. Note that unlike higher level copies in FileUtilities, this method always performs the copy, even if sourceFile is older than targetFile.
def copyFile (sourceFile : Path, targetFile : Path, log : Logger) : scala.Option[java.lang.String]
Copies sourceFile to targetFile. If targetFile exists, it is overwritten. Note that unlike higher level copies in FileUtilities, this method always performs the copy, even if sourceFile is older than targetFile.
def copyFilesFlat (sources : scala.Iterable[java.io.File], targetDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Copies the files declared in sources to the targetDirectory directory. The source directory hierarchy is flattened so that all copies are immediate children of targetDirectory. Directories are not recursively entered.
def copyFlat (sources : scala.Iterable[Path], destinationDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]] with scala.Product
Copies the files declared in sources to the destinationDirectory directory. The source directory hierarchy is flattened so that all copies are immediate children of destinationDirectory. Directories are not recursively entered.
def createDirectories (d : scala.Iterable[Path], log : Logger) : scala.Option[java.lang.String]
Creates directories at the given locations.
def createDirectories (d : scala.List[java.io.File], log : Logger) : scala.Option[java.lang.String]
Creates directories at the given locations.
def createDirectory (dir : java.io.File, log : Logger) : scala.Option[java.lang.String]
Creates a directory at the given location.
def createDirectory (dir : Path, log : Logger) : scala.Option[java.lang.String]
Creates a directory at the given location.
def createTemporaryDirectory (log : Logger) : scala.Either[java.lang.String, java.io.File]
Creates a temporary directory and returns it.
def doInTemporaryDirectory [T](log : Logger)(action : (java.io.File) => scala.Either[java.lang.String, T]) : scala.Either[java.lang.String, T]
Creates a temporary directory and provides its location to the given function. The directory is deleted after the function returns.
def download (url : java.net.URL, to : java.io.File, log : Logger) : scala.Option[java.lang.String]
Retrieves the content of the given URL and writes it to the given File.
def gunzip (in : Path, out : Path, log : Logger) : scala.Option[java.lang.String]
Gunzips the file 'in' and writes it to 'out'. 'in' cannot be the same file as 'out'.
def gunzip (input : java.io.InputStream, output : java.io.OutputStream, log : Logger) : scala.Option[java.lang.String]
def gzip (input : java.io.InputStream, output : java.io.OutputStream, log : Logger) : scala.Option[java.lang.String]
Gzips the InputStream 'in' and writes it to 'output'. Neither stream is closed.
def gzip (in : Path, out : Path, log : Logger) : scala.Option[java.lang.String]
Gzips the file 'in' and writes it to 'out'. 'in' cannot be the same file as 'out'.
def jar (sources : scala.Iterable[Path], outputJar : Path, manifest : java.util.jar.Manifest, recursive : Boolean, log : Logger) : scala.Option[java.lang.String]
Creates a jar file.
def pack (sources : scala.Iterable[Path], outputJar : Path, manifest : java.util.jar.Manifest, recursive : Boolean, log : Logger) : scala.Option[java.lang.String]
def preserve (paths : scala.Iterable[Path], log : Logger) : scala.Either[java.lang.String, Preserved]
def prune (directory : Path, keepOnly : scala.Iterable[Path], log : Logger) : scala.Option[java.lang.String]
def read (file : java.io.File, charset : java.nio.charset.Charset, log : Logger)(f : (java.io.Reader) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens a Reader on the given file using the default encoding, passes it to the provided function, and closes the Reader.
def read (file : java.io.File, log : Logger)(f : (java.io.Reader) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens a Reader on the given file using the default encoding, passes it to the provided function, and closes the Reader.
def readBytes (file : java.io.File, log : Logger) : scala.Either[java.lang.String, scala.Array[Byte]]
Reads the entire file into a byte array.
def readBytes (in : java.io.InputStream, log : Logger) : scala.Either[java.lang.String, scala.Array[Byte]]
def readChannel (file : java.io.File, log : Logger)(f : (java.nio.channels.FileChannel) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens a FileChannel on the given file for reading and passes the channel to the given function. The channel is closed before this function returns.
def readChannelValue [R](file : java.io.File, log : Logger)(f : (java.nio.channels.FileChannel) => scala.Either[java.lang.String, R]) : scala.Either[java.lang.String, R]
Opens a FileChannel on the given file for reading and passes the channel to the given function. The channel is closed before this function returns.
def readStream (file : java.io.File, log : Logger)(f : (java.io.InputStream) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens an InputStream on the given file and passes the stream to the provided function. The stream is closed before this function returns.
def readStream (url : java.net.URL, log : Logger)(f : (java.io.InputStream) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens an InputStream on the given URL and passes the stream to the provided function. The stream is closed before this function returns.
def readStreamValue [R](file : java.io.File, log : Logger)(f : (java.io.InputStream) => scala.Either[java.lang.String, R]) : scala.Either[java.lang.String, R]
Opens an InputStream on the given file and passes the stream to the provided function. The stream is closed before this function returns.
def readStreamValue [R](url : java.net.URL, log : Logger)(f : (java.io.InputStream) => scala.Either[java.lang.String, R]) : scala.Either[java.lang.String, R]
Opens an InputStream on the given URL and passes the stream to the provided function. The stream is closed before this function returns.
def readString (in : java.io.InputStream, charset : java.nio.charset.Charset, log : Logger) : scala.Either[java.lang.String, java.lang.String]
def readString (file : java.io.File, log : Logger) : scala.Either[java.lang.String, java.lang.String]
Reads the contents of the given file into a String using the default encoding. The resulting String is wrapped in Right.
def readString (file : java.io.File, charset : java.nio.charset.Charset, log : Logger) : scala.Either[java.lang.String, java.lang.String]
Reads the contents of the given file into a String using the given encoding. The resulting String is wrapped in Right.
def readString (in : java.io.InputStream, log : Logger) : scala.Either[java.lang.String, java.lang.String]
def readString (in : java.io.Reader, log : Logger) : scala.Either[java.lang.String, java.lang.String]
def readValue [R](file : java.io.File, charset : java.nio.charset.Charset, log : Logger)(f : (java.io.Reader) => scala.Either[java.lang.String, R]) : scala.Either[java.lang.String, R]
Opens a Reader on the given file using the given encoding, passes it to the provided function, and closes the Reader.
def readValue [R](file : java.io.File, log : Logger)(f : (java.io.Reader) => scala.Either[java.lang.String, R]) : scala.Either[java.lang.String, R]
Opens a Reader on the given file using the default encoding, passes it to the provided function, and closes the Reader.
def scalaJars : scala.Iterable[java.io.File]
def sync (sourceDirectory : Path, targetDirectory : Path, log : Logger) : scala.Option[java.lang.String]
Synchronizes the contents of the sourceDirectory directory to the targetDirectory directory.
def syncPaths (sources : PathFinder, targetDirectory : Path, log : Logger) : scala.Option[java.lang.String]
def toFile (url : java.net.URL) : java.io.File
def touch (file : java.io.File, log : Logger) : scala.Option[java.lang.String]
Creates a file at the given location.
def touch (path : Path, log : Logger) : scala.Option[java.lang.String]
Creates a file at the given location.
def transfer (in : java.io.InputStream, out : java.io.OutputStream, log : Logger) : scala.Option[java.lang.String]
Copies all bytes from the given input stream to the given output stream. Neither stream is closed.
def transferAndClose (in : java.io.InputStream, out : java.io.OutputStream, log : Logger) : scala.Option[java.lang.String]
Copies all bytes from the given input stream to the given output stream. The input stream is closed after the method completes.
def unzip (from : java.io.InputStream, toDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory.
def unzip (from : java.net.URL, toDirectory : Path, filter : NameFilter, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory. Only the entries that match the given filter are extracted.
def unzip (from : java.net.URL, toDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory.
def unzip (from : java.io.InputStream, toDirectory : Path, filter : NameFilter, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory. Only the entries that match the given filter are extracted.
def unzip (from : java.io.File, toDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory.
def unzip (from : java.io.File, toDirectory : Path, filter : NameFilter, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory. Only the entries that match the given filter are extracted.
def unzip (from : Path, toDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory.
def unzip (from : Path, toDirectory : Path, filter : NameFilter, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory. Only the entries that match the given filter are extracted.
def withTemporaryDirectory (log : Logger)(action : (java.io.File) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
def withTemporaryFile [T](log : Logger, prefix : java.lang.String, postfix : java.lang.String)(action : (java.io.File) => scala.Either[java.lang.String, T]) : scala.Either[java.lang.String, T]
def write (file : java.io.File, charset : java.nio.charset.Charset, log : Logger)(f : (java.io.Writer) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens a Writer on the given file using the given encoding, passes it to the provided function, and closes the Writer.
def write (file : java.io.File, content : java.lang.String, log : Logger) : scala.Option[java.lang.String]
Writes the given String content to the provided file using the default encoding. If the file exists, it is overwritten.
def write (file : java.io.File, content : java.lang.String, charset : java.nio.charset.Charset, log : Logger) : scala.Option[java.lang.String]
Writes the given String content to the provided file using the given encoding. If the file already exists, it is overwritten.
def write (file : java.io.File, bytes : scala.Array[Byte], log : Logger) : scala.Option[java.lang.String]
Writes the given bytes to the given file. If the file already exists, it is overwritten.
def write (file : java.io.File, log : Logger)(f : (java.io.Writer) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens a Writer on the given file using the default encoding, passes it to the provided function, and closes the Writer.
def writeChannel (file : java.io.File, log : Logger)(f : (java.nio.channels.FileChannel) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens a FileChannel on the given file for writing and passes the channel to the given function. The channel is closed before this function returns.
def writeStream (file : java.io.File, log : Logger)(f : (java.io.OutputStream) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens an OutputStream on the given file and passes the stream to the provided function. The stream is closed before this function returns.
def zip (sources : scala.Iterable[Path], outputZip : Path, recursive : Boolean, log : Logger) : scala.Option[java.lang.String]
Creates a zip file.
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
val Newline : java.lang.String

val temporaryDirectory : java.io.File
The directory in which temporary files are placed.

lazy val scalaLibraryJar : java.io.File

lazy val scalaCompilerJar : java.io.File

Method Details
def preserve(paths : scala.Iterable[Path], log : Logger) : scala.Either[java.lang.String, Preserved]

def gzip(in : Path, out : Path, log : Logger) : scala.Option[java.lang.String]
Gzips the file 'in' and writes it to 'out'. 'in' cannot be the same file as 'out'.

def gzip(input : java.io.InputStream, output : java.io.OutputStream, log : Logger) : scala.Option[java.lang.String]
Gzips the InputStream 'in' and writes it to 'output'. Neither stream is closed.

def gunzip(input : java.io.InputStream, output : java.io.OutputStream, log : Logger) : scala.Option[java.lang.String]

def gunzip(in : Path, out : Path, log : Logger) : scala.Option[java.lang.String]
Gunzips the file 'in' and writes it to 'out'. 'in' cannot be the same file as 'out'.

def jar(sources : scala.Iterable[Path], outputJar : Path, manifest : java.util.jar.Manifest, recursive : Boolean, log : Logger) : scala.Option[java.lang.String]
Creates a jar file.
Parameters
sources - The files to include in the jar file. The path used for the jar is relative to the base directory for the source. That is, the path in the jar for source (basePath ##) / x / y is x / y.
outputJar - The file to write the jar to.
manifest - The manifest for the jar.
recursive - If true, any directories in sources are recursively processed. Otherwise, they are not
log - The Logger to use.

@scala.deprecated

def pack(sources : scala.Iterable[Path], outputJar : Path, manifest : java.util.jar.Manifest, recursive : Boolean, log : Logger) : scala.Option[java.lang.String]

def zip(sources : scala.Iterable[Path], outputZip : Path, recursive : Boolean, log : Logger) : scala.Option[java.lang.String]
Creates a zip file.
Parameters
sources - The files to include in the jar file. The path used for the jar is relative to the base directory for the source. That is, the path in the jar for source (basePath ##) / x / y is x / y.
outputZip - The file to write the zip to.
recursive - If true, any directories in sources are recursively processed. Otherwise, they are not
log - The Logger to use.

def unzip(from : Path, toDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory.

def unzip(from : java.io.File, toDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory.

def unzip(from : java.io.InputStream, toDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory.

def unzip(from : java.net.URL, toDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory.

def unzip(from : Path, toDirectory : Path, filter : NameFilter, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory. Only the entries that match the given filter are extracted.

def unzip(from : java.io.File, toDirectory : Path, filter : NameFilter, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory. Only the entries that match the given filter are extracted.

def unzip(from : java.net.URL, toDirectory : Path, filter : NameFilter, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory. Only the entries that match the given filter are extracted.

def unzip(from : java.io.InputStream, toDirectory : Path, filter : NameFilter, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Unzips the contents of the zip file from to the toDirectory directory. Only the entries that match the given filter are extracted.

def transfer(in : java.io.InputStream, out : java.io.OutputStream, log : Logger) : scala.Option[java.lang.String]
Copies all bytes from the given input stream to the given output stream. Neither stream is closed.

def transferAndClose(in : java.io.InputStream, out : java.io.OutputStream, log : Logger) : scala.Option[java.lang.String]
Copies all bytes from the given input stream to the given output stream. The input stream is closed after the method completes.

def touch(path : Path, log : Logger) : scala.Option[java.lang.String]
Creates a file at the given location.

def touch(file : java.io.File, log : Logger) : scala.Option[java.lang.String]
Creates a file at the given location.

def createDirectory(dir : Path, log : Logger) : scala.Option[java.lang.String]
Creates a directory at the given location.

def createDirectory(dir : java.io.File, log : Logger) : scala.Option[java.lang.String]
Creates a directory at the given location.

def createDirectories(d : scala.Iterable[Path], log : Logger) : scala.Option[java.lang.String]
Creates directories at the given locations.

def createDirectories(d : scala.List[java.io.File], log : Logger) : scala.Option[java.lang.String]
Creates directories at the given locations.

def createTemporaryDirectory(log : Logger) : scala.Either[java.lang.String, java.io.File]
Creates a temporary directory and returns it.

def withTemporaryDirectory(log : Logger)(action : (java.io.File) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]

def doInTemporaryDirectory[T](log : Logger)(action : (java.io.File) => scala.Either[java.lang.String, T]) : scala.Either[java.lang.String, T]
Creates a temporary directory and provides its location to the given function. The directory is deleted after the function returns.

def withTemporaryFile[T](log : Logger, prefix : java.lang.String, postfix : java.lang.String)(action : (java.io.File) => scala.Either[java.lang.String, T]) : scala.Either[java.lang.String, T]

def copyFlat(sources : scala.Iterable[Path], destinationDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]] with scala.Product
Copies the files declared in sources to the destinationDirectory directory. The source directory hierarchy is flattened so that all copies are immediate children of destinationDirectory. Directories are not recursively entered.

def download(url : java.net.URL, to : java.io.File, log : Logger) : scala.Option[java.lang.String]
Retrieves the content of the given URL and writes it to the given File.

def copy(sources : scala.Iterable[Path], destinationDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Equivalent to {@code copy(sources, destinationDirectory, false, log)}.

def copy(sources : scala.Iterable[Path], destinationDirectory : Path, overwrite : Boolean, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Equivalent to {@code copy(sources, destinationDirectory, overwrite, false, log)}.

def copy(sources : scala.Iterable[Path], destinationDirectory : Path, overwrite : Boolean, preserveLastModified : Boolean, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Copies the files declared in sources to the destinationDirectory directory. Directories are not recursively entered. The destination hierarchy matches the source paths relative to any base directories. For example: A source (basePath ##) / x / y is copied to destinationDirectory / x / y.
Parameters
overwrite - if true, existing destination files are always overwritten
preserveLastModified - if true, the last modified time of copied files will be set equal to their corresponding source files.

def copyFilesFlat(sources : scala.Iterable[java.io.File], targetDirectory : Path, log : Logger) : scala.Either[java.lang.String, scala.collection.Set[Path]]
Copies the files declared in sources to the targetDirectory directory. The source directory hierarchy is flattened so that all copies are immediate children of targetDirectory. Directories are not recursively entered.

def copyFile(sourceFile : Path, targetFile : Path, log : Logger) : scala.Option[java.lang.String]
Copies sourceFile to targetFile. If targetFile exists, it is overwritten. Note that unlike higher level copies in FileUtilities, this method always performs the copy, even if sourceFile is older than targetFile.

def copyFile(sourceFile : java.io.File, targetFile : java.io.File, log : Logger) : scala.Option[java.lang.String]
Copies sourceFile to targetFile. If targetFile exists, it is overwritten. Note that unlike higher level copies in FileUtilities, this method always performs the copy, even if sourceFile is older than targetFile.

def sync(sourceDirectory : Path, targetDirectory : Path, log : Logger) : scala.Option[java.lang.String]
Synchronizes the contents of the sourceDirectory directory to the targetDirectory directory.

def syncPaths(sources : PathFinder, targetDirectory : Path, log : Logger) : scala.Option[java.lang.String]

def prune(directory : Path, keepOnly : scala.Iterable[Path], log : Logger) : scala.Option[java.lang.String]

def copyDirectory(source : Path, target : Path, log : Logger) : scala.Option[java.lang.String]
Copies the contents of the source directory to the target directory .

def copyDirectory(source : java.io.File, target : java.io.File, log : Logger) : scala.Option[java.lang.String]
Copies the contents of the source directory to the target directory .

def clean(file : Path, log : Logger) : scala.Option[java.lang.String]
Deletes the given file recursively.

def clean(files : scala.Iterable[Path], log : Logger) : scala.Option[java.lang.String]
Deletes the given files recursively.

def clean(files : scala.Iterable[Path], quiet : Boolean, log : Logger) : scala.Option[java.lang.String]
Deletes the given files recursively. quiet determines the logging level. If it is true, each file in files is logged at the info level. If it is false, the debug level is used.

def append(file : java.io.File, content : java.lang.String, log : Logger) : scala.Option[java.lang.String]
Appends the given String content to the provided file using the default encoding. A new file is created if it does not exist.

def append(file : java.io.File, content : java.lang.String, charset : java.nio.charset.Charset, log : Logger) : scala.Option[java.lang.String]
Appends the given String content to the provided file using the given encoding. A new file is created if it does not exist.

def write(file : java.io.File, content : java.lang.String, log : Logger) : scala.Option[java.lang.String]
Writes the given String content to the provided file using the default encoding. If the file exists, it is overwritten.

def write(file : java.io.File, content : java.lang.String, charset : java.nio.charset.Charset, log : Logger) : scala.Option[java.lang.String]
Writes the given String content to the provided file using the given encoding. If the file already exists, it is overwritten.

def write(file : java.io.File, log : Logger)(f : (java.io.Writer) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens a Writer on the given file using the default encoding, passes it to the provided function, and closes the Writer.

def write(file : java.io.File, charset : java.nio.charset.Charset, log : Logger)(f : (java.io.Writer) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens a Writer on the given file using the given encoding, passes it to the provided function, and closes the Writer.

def read(file : java.io.File, log : Logger)(f : (java.io.Reader) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens a Reader on the given file using the default encoding, passes it to the provided function, and closes the Reader.

def read(file : java.io.File, charset : java.nio.charset.Charset, log : Logger)(f : (java.io.Reader) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens a Reader on the given file using the default encoding, passes it to the provided function, and closes the Reader.

def readValue[R](file : java.io.File, log : Logger)(f : (java.io.Reader) => scala.Either[java.lang.String, R]) : scala.Either[java.lang.String, R]
Opens a Reader on the given file using the default encoding, passes it to the provided function, and closes the Reader.

def readValue[R](file : java.io.File, charset : java.nio.charset.Charset, log : Logger)(f : (java.io.Reader) => scala.Either[java.lang.String, R]) : scala.Either[java.lang.String, R]
Opens a Reader on the given file using the given encoding, passes it to the provided function, and closes the Reader.

def readString(file : java.io.File, log : Logger) : scala.Either[java.lang.String, java.lang.String]
Reads the contents of the given file into a String using the default encoding. The resulting String is wrapped in Right.

def readString(file : java.io.File, charset : java.nio.charset.Charset, log : Logger) : scala.Either[java.lang.String, java.lang.String]
Reads the contents of the given file into a String using the given encoding. The resulting String is wrapped in Right.

def readString(in : java.io.InputStream, log : Logger) : scala.Either[java.lang.String, java.lang.String]

def readString(in : java.io.InputStream, charset : java.nio.charset.Charset, log : Logger) : scala.Either[java.lang.String, java.lang.String]

def readString(in : java.io.Reader, log : Logger) : scala.Either[java.lang.String, java.lang.String]

def append(file : java.io.File, bytes : scala.Array[Byte], log : Logger) : scala.Option[java.lang.String]
Appends the given bytes to the given file.

def write(file : java.io.File, bytes : scala.Array[Byte], log : Logger) : scala.Option[java.lang.String]
Writes the given bytes to the given file. If the file already exists, it is overwritten.

def readBytes(file : java.io.File, log : Logger) : scala.Either[java.lang.String, scala.Array[Byte]]
Reads the entire file into a byte array.

def readBytes(in : java.io.InputStream, log : Logger) : scala.Either[java.lang.String, scala.Array[Byte]]

def appendStream(file : java.io.File, log : Logger)(f : (java.io.OutputStream) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens an OutputStream on the given file with append=true and passes the stream to the provided function. The stream is closed before this function returns.

def writeStream(file : java.io.File, log : Logger)(f : (java.io.OutputStream) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens an OutputStream on the given file and passes the stream to the provided function. The stream is closed before this function returns.

def readStream(file : java.io.File, log : Logger)(f : (java.io.InputStream) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens an InputStream on the given file and passes the stream to the provided function. The stream is closed before this function returns.

def readStreamValue[R](file : java.io.File, log : Logger)(f : (java.io.InputStream) => scala.Either[java.lang.String, R]) : scala.Either[java.lang.String, R]
Opens an InputStream on the given file and passes the stream to the provided function. The stream is closed before this function returns.

def readStream(url : java.net.URL, log : Logger)(f : (java.io.InputStream) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens an InputStream on the given URL and passes the stream to the provided function. The stream is closed before this function returns.

def readStreamValue[R](url : java.net.URL, log : Logger)(f : (java.io.InputStream) => scala.Either[java.lang.String, R]) : scala.Either[java.lang.String, R]
Opens an InputStream on the given URL and passes the stream to the provided function. The stream is closed before this function returns.

def writeChannel(file : java.io.File, log : Logger)(f : (java.nio.channels.FileChannel) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens a FileChannel on the given file for writing and passes the channel to the given function. The channel is closed before this function returns.

def readChannel(file : java.io.File, log : Logger)(f : (java.nio.channels.FileChannel) => scala.Option[java.lang.String]) : scala.Option[java.lang.String]
Opens a FileChannel on the given file for reading and passes the channel to the given function. The channel is closed before this function returns.

def readChannelValue[R](file : java.io.File, log : Logger)(f : (java.nio.channels.FileChannel) => scala.Either[java.lang.String, R]) : scala.Either[java.lang.String, R]
Opens a FileChannel on the given file for reading and passes the channel to the given function. The channel is closed before this function returns.

def toFile(url : java.net.URL) : java.io.File

def classLocation(cl : java.lang.Class[Any]) : java.net.URL

def classLocationFile(cl : java.lang.Class[Any]) : java.io.File

def classLocation[T](implicit mf : scala.reflect.Manifest[T]) : java.net.URL

def classLocationFile[T](implicit mf : scala.reflect.Manifest[T]) : java.io.File

def scalaJars : scala.Iterable[java.io.File]