An abstraction for files. For character data, a Codec can be supplied at either creation time or when a method involving character data is called (with the latter taking precedence if supplied.) If neither is available, the value of scala.io.Codec.default is used.
- Authors
Paul Phillips
- Since
2.8 ''Note: This is library is considered experimental and should not be used unless you know what you are doing.''
- Companion
- object
Value members
Concrete methods
Wraps a BufferedWriter around the result of writer().
Wraps a BufferedWriter around the result of writer().
Calls println on each string (so it adds a newline in the PrintWriter fashion.)
Calls println on each string (so it adds a newline in the PrintWriter fashion.)
Creates a new file and writes all the Strings to it.
Creates a new file and writes all the Strings to it.
Obtains an OutputStreamWriter wrapped around a FileOutputStream. This should behave like a less broken version of java.io.FileWriter, in that unlike the java version you can specify the encoding.
Obtains an OutputStreamWriter wrapped around a FileOutputStream. This should behave like a less broken version of java.io.FileWriter, in that unlike the java version you can specify the encoding.
Inherited methods
Creates a new Path with the specified path appended. Assumes the type of the new component implies the type of the result.
Creates a new Path with the specified path appended. Assumes the type of the new component implies the type of the result.
- Inherited from
- Path
Creates a BufferedReader and applies the closure, automatically closing it on completion.
Creates a BufferedReader and applies the closure, automatically closing it on completion.
- Inherited from
- Chars
Wraps a BufferedReader around the result of reader().
Wraps a BufferedReader around the result of reader().
- Inherited from
- Chars
Caller is responsible for closing the returned BufferedSource.
Caller is responsible for closing the returned BufferedSource.
- Inherited from
- Chars
Deletes the path recursively. Returns false on failure. Use with caution!
Deletes the path recursively. Returns false on failure. Use with caution!
- Inherited from
- Path
Beware! Leaks an InputStream which will not be closed until it gets finalized.
Beware! Leaks an InputStream which will not be closed until it gets finalized.
- Inherited from
- Chars
Beware! Leaks an InputStream which will not be closed until it gets finalized.
Beware! Leaks an InputStream which will not be closed until it gets finalized.
- Inherited from
- Chars
Obtains an InputStreamReader wrapped around a FileInputStream.
Obtains an InputStreamReader wrapped around a FileInputStream.
- Inherited from
- Chars
Convenience function to import entire file into a String.
Convenience function to import entire file into a String.
- Inherited from
- Chars
If this path is absolute, returns it: otherwise, returns an absolute path made up of root / this.
If this path is absolute, returns it: otherwise, returns an absolute path made up of root / this.
- Inherited from
- Path
This method aspires to be the fastest way to read a stream of known length into memory.
This method aspires to be the fastest way to read a stream of known length into memory.
- Inherited from
- Bytes