The newline string for this system, as obtained by the line.
The newline string for this system, as obtained by the line.separator system property.
Converts the given URL to a File.
Converts the given URL to a File. If the URL is for an entry in a jar, the File for the jar is returned.
Returns a URL for the directory or jar containing the class file for type T
(as determined by an implicit Manifest).
Returns a URL for the directory or jar containing the class file for type T
(as determined by an implicit Manifest).
If the location cannot be determined, an error is generated.
Note that Java standard library classes typically do not have a location associated with them.
Returns a URL for the directory or jar containing the the class file cl
.
Returns a URL for the directory or jar containing the the class file cl
.
If the location cannot be determined, an error is generated.
Note that Java standard library classes typically do not have a location associated with them.
Returns the directory or jar file containing the the class file for type T
(as determined by an implicit Manifest).
Returns the directory or jar file containing the the class file for type T
(as determined by an implicit Manifest).
If the location cannot be determined, an error is generated.
Note that Java standard library classes typically do not have a location associated with them.
Returns the directory or jar file containing the the class file cl
.
Returns the directory or jar file containing the the class file cl
.
If the location cannot be determined or it is not a file, an error is generated.
Note that Java standard library classes typically do not have a location associated with them.
Creates a directory in the default temporary directory with a name generated from a random integer.
Creates a directory in baseDirectory
with a name generated from a random integer
Deletes file
, recursively if it is a directory.
Deletes each file or directory (recursively) in files
.
Deletes each file or directory in files
recursively.
Deletes each file or directory in files
recursively. Any empty parent directories are deleted, recursively.
Deletes all empty directories in the set.
Deletes all empty directories in the set. Any non-empty directories are ignored.
Converts an absolute File to a URI.
Converts an absolute File to a URI. The File is converted to a URI (toURI), normalized (normalize), encoded (toASCIIString), and a forward slash ('/') is appended to the path component if it does not already end with a slash.
Converts an absolute File to a URI.
Converts an absolute File to a URI. The File is converted to a URI (toURI), normalized (normalize), encoded (toASCIIString), and a forward slash ('/') is appended to the path component if it does not already end with a slash.
Retrieves the content of the given URL and writes it to the given File.
Gunzips the InputStream 'input' and writes it to 'output'.
Gunzips the InputStream 'input' and writes it to 'output'. Neither stream is closed.
Gunzips the file 'in' and writes it to 'out'.
Gunzips the file 'in' and writes it to 'out'. 'in' cannot be the same file as 'out'.
Gzips the InputStream 'in' and writes it to 'output'.
Gzips the InputStream 'in' and writes it to 'output'. Neither stream is closed.
Gzips the file 'in' and writes it to 'out'.
Gzips the file 'in' and writes it to 'out'. 'in' cannot be the same file as 'out'.
Creates a jar file.
Creates a jar file.
The files to include in the jar file paired with the entry name in the jar. Only the pairs explicitly listed are included.
The file to write the jar to.
The manifest for the jar.
Returns the children of directory dir
in a non-null array.
Returns the children of directory dir
that match filter
in a non-null array.
Returns the children of directory dir
that match filter
in a non-null array.
Splits a String around path separator characters.
doesn't close the InputStream
doesn't close the InputStream
Splits the given string into base and extension strings.
Splits the given string into base and extension strings.
If name
contains no period, the base string is the input string and the extension is the empty string.
Otherwise, the base is the substring up until the last period (exclusive) and
the extension is the substring after the last period.
For example, split("Build.scala") == ("Build", "scala")
Move the provided files to a temporary location.
Move the provided files to a temporary location. If 'f' returns normally, delete the files. If 'f' throws an Exception, return the files to their original location.
Constructs a File corresponding to url
, which must have a scheme of file
.
Constructs a File corresponding to url
, which must have a scheme of file
.
This method properly works around an issue with a simple conversion to URI and then to a File.
Converts the given File to a URI.
Converts the given File to a URI. If the File is relative, the URI is relative, unlike File.toURI
Creates a file at the given location if it doesn't exist.
Creates a file at the given location if it doesn't exist.
If the file already exists and setModified
is true, this method sets the last modified time to the current time.
Each input file in files
is created if it doesn't exist.
Each input file in files
is created if it doesn't exist.
If a file already exists, the last modified time is set to the current time.
It is not guaranteed that all files will have the same last modified time after this call.
Copies all bytes from the given input stream to the given output stream.
Copies all bytes from the given input stream to the given output stream. Neither stream is closed.
Copies all bytes from the given input stream to the given File.
Copies all bytes from the given input stream to the given File. The input stream is not closed by this method.
Copies the contents of the input file in
to the out
stream.
Copies the contents of the input file in
to the out
stream.
The output stream is not closed by this method.
Copies the contents of in
to out
.
Copies all bytes from the given input stream to the given output stream.
Copies all bytes from the given input stream to the given output stream. The input stream is closed after the method completes.
Creates a temporary directory and provides its location to the given function.
Creates a temporary directory and provides its location to the given function. The directory is deleted after the function returns.
Creates a file in the default temporary directory, calls action
with the file, deletes the file, and returns the result of calling action
.
Creates a file in the default temporary directory, calls action
with the file, deletes the file, and returns the result of calling action
.
The name of the file will begin with prefix
, which must be at least three characters long, and end with postfix
, which has no minimum length.
Creates a zip file.
Creates a zip file.
The files to include in the zip file paired with the entry name in the zip. Only the pairs explicitly listed are included.
The file to write the zip to.
A collection of File, URL, and I/O utility methods.