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.
Attributes
- Authors:
-
Paul Phillips
- Since
-
2.8 ''Note: This library is considered experimental and should not be used unless you know what you are doing.''
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Attributes
- Definition Classes
Wraps a BufferedWriter around the result of writer().
Wraps a BufferedWriter around the result of writer().
Attributes
Obtains an InputStream.
Obtains an InputStream.
Attributes
Obtains a OutputStream.
Obtains a OutputStream.
Attributes
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.)
Attributes
Reflection since we're into the java 6+ API.
Reflection since we're into the java 6+ API.
Attributes
Attributes
- Definition Classes
Attributes
- Definition Classes
If this path is a directory, recursively iterate over its contents. The supplied condition is a filter which is applied to each element, with that branch of the tree being closed off if it is false. So for example if the condition is false for some subdirectory, nothing under that directory will be in the Iterator. If it's true, all files for which the condition holds and are directly in that subdirectory are in the Iterator, and all sub-subdirectories are recursively evaluated
If this path is a directory, recursively iterate over its contents. The supplied condition is a filter which is applied to each element, with that branch of the tree being closed off if it is false. So for example if the condition is false for some subdirectory, nothing under that directory will be in the Iterator. If it's true, all files for which the condition holds and are directly in that subdirectory are in the Iterator, and all sub-subdirectories are recursively evaluated
Attributes
- Definition Classes
Creates a new file and writes all the Strings to it.
Creates a new file and writes all the Strings to it.
Attributes
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.
Attributes
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.
Attributes
- 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.
Attributes
- Inherited from:
- Chars
Attributes
- Inherited from:
- Bytes
Attributes
- Inherited from:
- Chars
Wraps a BufferedReader around the result of reader().
Attributes
- Inherited from:
- Bytes
Attributes
- Inherited from:
- Path
Caller is responsible for closing the returned BufferedSource.
Attributes
- Inherited from:
- Path
Attributes
- Inherited from:
- Path
Deletes the path recursively. Returns false on failure. Use with caution!
Deletes the path recursively. Returns false on failure. Use with caution!
Attributes
- Inherited from:
- Path
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Any implementation of this method should be an equivalence relation:
- It is reflexive: for any instance
x
of typeAny
,x.equals(x)
should returntrue
. - It is symmetric: for any instances
x
andy
of typeAny
,x.equals(y)
should returntrue
if and only ify.equals(x)
returnstrue
. - It is transitive: for any instances
x
,y
, andz
of typeAny
ifx.equals(y)
returnstrue
andy.equals(z)
returnstrue
, thenx.equals(z)
should returntrue
.
If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode
to ensure that objects which are "equal" (o1.equals(o2)
returns true
) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)
).
Value parameters
- that
-
the object to compare against this object for equality.
Attributes
Attributes
- Inherited from:
- Path
Calculate a hash code value for the object.
Calculate a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)
) yet not be equal (o1.equals(o2)
returns false
). A degenerate implementation could always return 0
. However, it is required that if two objects are equal (o1.equals(o2)
returns true
) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)
). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals
method.
Attributes
Attributes
- Inherited from:
- Path
Attributes
- Inherited from:
- Path
Attributes
- Inherited from:
- Path
Attributes
- 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.
Attributes
- 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.
Attributes
- Inherited from:
- Chars
Attributes
- Returns
-
The path of the parent directory, or root if path is already root
- Inherited from:
- Path
Obtains an InputStreamReader wrapped around a FileInputStream.
Attributes
- Inherited from:
- Path
Convenience function to import entire file into a String.
Attributes
- Inherited from:
- Path
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.
Attributes
- 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.
Attributes
- Inherited from:
- Bytes
Attributes
- Inherited from:
- Path
Concrete fields
Calls to methods requiring byte<->char transformations should be offered in a form which allows specifying the codec. When it is not specified, the one discovered at creation time will be used, which will always find the one in scala.io.Codec if no other is available. This can be overridden to use a different default.
Calls to methods requiring byte<->char transformations should be offered in a form which allows specifying the codec. When it is not specified, the one discovered at creation time will be used, which will always find the one in scala.io.Codec if no other is available. This can be overridden to use a different default.