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.
Appends bytes to the existing contents of file.
Appends bytes to the existing contents of file.
If file does not exist, it is created, as are any parent directories.
Appends content to the existing contents of file using charset or UTF-8 if charset is not explicitly specified.
Appends content to the existing contents of file using charset or UTF-8 if charset is not explicitly specified.
If file does not exist, it is created, as are any parent directories.
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 the directory or jar file containing the class file cl.
Returns the directory or jar file containing the class file cl.
If the location cannot be determined or if it is not a file, 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 a URL for the classfile containing the given class If the location cannot be determined, an error is generated.
Returns a URL for the classfile containing the given class file for type T (as determined by an implicit Manifest).
Returns a URL for the classfile containing the given class file for type T (as determined by an implicit Manifest).
If the location cannot be determined, an error is generated.
For each pair in sources, copies the contents of the first File (the source) to the location of the second File (the target).
For each pair in sources, copies the contents of the first File (the source) to the location of the second File (the target).
A source file is always copied if overwrite is true.
If overwrite is false, the source is only copied if the target is missing or is older than the source file according to last modified times.
If the source is a directory, the corresponding directory is created.
If preserveLastModified is true, the last modified times are transferred as well.
Any parent directories that do not exist are created.
The set of all target files is returned, whether or not they were updated by this method.
Copies the contents of each file in the source directory to the corresponding file in the target directory.
Copies the contents of each file in the source directory to the corresponding file in the target directory.
A source file is always copied if overwrite is true.
If overwrite is false, the source is only copied if the target is missing or is older than the source file according to last modified times.
Files in target without a corresponding file in source are left unmodified in any case.
If preserveLastModified is true, the last modified times are transferred as well.
Any parent directories that do not exist are created.
Copies the contents of sourceFile to the location of targetFile, overwriting any existing content.
Copies the contents of sourceFile to the location of targetFile, overwriting any existing content.
If preserveLastModified is true, the last modified time is transferred as well.
Transfers the last modified time of sourceFile to targetFile.
Creates directories dirs and all parent directories.
Creates directories dirs and all parent directories. It tries to work around a race condition in File.mkdirs() by retrying up to a limit.
Creates directory dir and all parent directories.
Creates directory dir and all parent directories. It tries to work around a race condition in File.mkdirs() by retrying up to a limit.
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
The default Charset used when not specified: UTF-8.
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.
Applies f to each line read from in and the accumulated value of type T, with initial value init.
Applies f to each line read from in and the accumulated value of type T, with initial value init.
This method does not close in.
Applies f to each line read from in.
Applies f to each line read from in. This method does not close in.
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'.
Applies f to a buffered gzip InputStream for file.
Applies f to a buffered gzip InputStream for file.
The streams involved are opened before calling f and closed after it returns.
The result is the result of f.
Applies f to a buffered gzip OutputStream for file.
Applies f to a buffered gzip OutputStream for file.
The streams involved are opened before calling f and closed after it returns.
The result is the result of f.
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.
Reads the properties in from into properties.
Reads the properties in from into properties. If from does not exist, properties is left unchanged.
Moves the contents of a to the location specified by b.
Moves the contents of a to the location specified by b.
This method deletes any content already at b and creates any parent directories of b if they do not exist.
It will first try File.renameTo and if that fails, resort to copying and then deleting the original file.
In either case, the original File will not exist on successful completion of this method.
For each pair in files, moves the contents of the first File to the location of the second.
For each pair in files, moves the contents of the first File to the location of the second.
See move(File,File) for the behavior of the individual move operations.
Constructs an ObjectInputStream on wrapped that uses loader to load classes.
Constructs an ObjectInputStream on wrapped that uses loader to load classes.
See also issue 136.
Parses a classpath String into File entries according to the current platform's path separator.
Splits a String around the platform's path separator characters.
Reads the full contents of file into a String using charset or UTF-8 if charset is not explicitly specified.
Reads the full contents of in into a byte array.
Reads the full contents of in into a byte array. This method does not close in.
Reads the full contents of in into a byte array.
Reads all of the lines from in.
Reads all of the lines from in. This method does not close in.
Reads all of the lines in file using the provided charset or UTF-8 if charset is not explicitly specified.
Reads all of the lines from url using the provided charset or UTF-8 if charset is not explicitly specified.
Reads the full contents of in into a byte array.
Reads the full contents of in into a byte array. This method does not close in.
Returns the path for file relative to directory base or None if base is not a parent of file.
Returns the path for file relative to directory base or None if base is not a parent of file.
If file or base are not absolute, they are first resolved against the current working directory.
Returns the relative file for file relative to directory base or None if base is not a parent of file.
Returns the relative file for file relative to directory base or None if base is not a parent of file.
If file or base are not absolute, they are first resolved against the current working directory.
Resolves f against base, which must be an absolute directory.
Resolves f against base, which must be an absolute directory.
The result is guaranteed to be absolute.
If f is absolute, it is returned without changes.
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.
Writes properties to the File to, using label as the comment on the first line.
Writes properties to the File to, using label as the comment on the first line.
If any parent directories of to do not exist, they are first created.
Writes bytes to file, overwriting any existing content.
Writes bytes to file, overwriting any existing content.
If any parent directories do not exist, they are first created.
Writes content to file using charset or UTF-8 if charset is not explicitly specified.
Writes content to file using charset or UTF-8 if charset is not explicitly specified.
If append is false, the existing contents of file are overwritten.
If append is true, the new content is appended to the existing contents.
If file or any parent directories do not exist, they are created.
Writes lines to writer using writer's println method.
Writes lines to file using the given charset or UTF-8 if charset is not explicitly specified.
Writes lines to file using the given charset or UTF-8 if charset is not explicitly specified.
If append is false, the contents of the file are overwritten.
If append is true, the lines are appended to the file.
A newline is written after each line and NOT before the first line.
If any parent directories of file do not exist, they are first created.
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.
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.
(Since version 0.13.10) Use classfileLocation or classLocationFile
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.
(Since version 0.13.10) Use classfileLocation or classLocationFile
A collection of File, URL, and I/O utility methods.