better.files
Members list
Type members
Classlikes
Encoder that writes the BOM for this charset
Encoder that writes the BOM for this charset
Attributes
- Graph
- Supertypes
- class CharsetEncoderclass Objecttrait Matchableclass Any
A typeclass to denote a disposable resource
A typeclass to denote a disposable resource
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- Disposable.type
Given a disposable resource, this actually does the disposing
Given a disposable resource, this actually does the disposing
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Do file ops using a UNIX command line DSL
Do file ops using a UNIX command line DSL
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- Dsl.type
Scala wrapper around java.nio.files.Path
Scala wrapper around java.nio.files.Path
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait Serializableclass Objecttrait Matchableclass Any
Implementation of File.Monitor
Implementation of File.Monitor
Attributes
- Graph
- Supertypes
Container for various implicits
Container for various implicits
Attributes
- Graph
- Supertypes
A sink outputstream similar to /dev/null - just consumes everything
A sink outputstream similar to /dev/null - just consumes everything
Attributes
- Graph
- Supertypes
- class OutputStreamtrait Flushabletrait Closeabletrait AutoCloseableclass Objecttrait Matchableclass Any
- Self type
- NullOutputStream.type
Code ported from Java to Scala: https://github.com/apache/commons-io/blob/c0eb48f7e83987c5ed112b82f0d651aff5149ae4/src/main/java/org/apache/commons/io/input/ReaderInputStream.java
Code ported from Java to Scala: https://github.com/apache/commons-io/blob/c0eb48f7e83987c5ed112b82f0d651aff5149ae4/src/main/java/org/apache/commons/io/input/ReaderInputStream.java
Attributes
- Graph
- Supertypes
- class InputStreamtrait Closeabletrait AutoCloseableclass Objecttrait Matchableclass Any
Finds and loads class resources or class loader resources.
Finds and loads class resources or class loader resources.
The default implementation of this trait is the Resource object, which looks up resources
using the current thread's context class loader.
The Resource object also offers several other Resource implementations,
through its methods at
, from
, and my
. at
searches from a Class,
from
searches from a ClassLoader,
and my
searches from the class, trait, or object surrounding the call.
Attributes
- See also:
- Example:
// Look up the config.properties file for this class or object. Resource.my.asStream("config.properties") // Find logging.properties (in the root package) somewhere on the classpath. Resource.url("logging.properties")
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- object Resource.type
Implementations of Resource.
Implementations of Resource.
This object itself is a Resource uses the current thread's
context class loader.
It also creates Resources with different lookup behavior, using the methods at
, from
, and my
. at
searches
rom a Class, from
searches
from a different ClassLoader,
and my
searches from the class, trait, or object surrounding the call.
Attributes
Implement this trait to make thing parsable In most cases, use Scanner.Read typeclass when you simply need access to one String token Use Scannable typeclass if you need access to the full scanner e.g. to detect encodings etc.
Implement this trait to make thing parsable In most cases, use Scanner.Read typeclass when you simply need access to one String token Use Scannable typeclass if you need access to the full scanner e.g. to detect encodings etc.
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- StringSplitter.type
Write to multiple outputstreams at once If error happens on any one while doing an operation, only the last error is reported
Write to multiple outputstreams at once If error happens on any one while doing an operation, only the last error is reported
Attributes
- Graph
- Supertypes
- class OutputStreamtrait Flushabletrait Closeabletrait AutoCloseableclass Objecttrait Matchableclass Any
A Unicode charset that handles byte-order markers
A Unicode charset that handles byte-order markers
Attributes
- underlyingCharset
Use this charset if no known byte-order marker is detected; use this for encoding too
- writeByteOrderMarkers
If set, write BOMs while encoding
- Companion:
- object
- Graph
- Supertypes
- class Charsettrait Comparable[Charset]class Objecttrait Matchableclass Any
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- UnicodeCharset.type
A Unicode decoder that uses the Unicode byte-order marker (BOM) to auto-detect the encoding (if none detected, falls back on the defaultCharset). This also gets around a bug in the JDK (http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4508058) where BOM is not consumed for UTF-8. See: https://github.com/pathikrit/better-files/issues/107
A Unicode decoder that uses the Unicode byte-order marker (BOM) to auto-detect the encoding (if none detected, falls back on the defaultCharset). This also gets around a bug in the JDK (http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4508058) where BOM is not consumed for UTF-8. See: https://github.com/pathikrit/better-files/issues/107
Attributes
- defaultCharset
Use this charset if no known byte-order marker is detected
- Graph
- Supertypes
- class CharsetDecoderclass Objecttrait Matchableclass Any
Code ported from Java to Scala: https://github.com/apache/commons-io/blob/d357d9d563c4a34fa2ab3cdc68221c851a9de4f5/src/main/java/org/apache/commons/io/output/WriterOutputStream.java
Code ported from Java to Scala: https://github.com/apache/commons-io/blob/d357d9d563c4a34fa2ab3cdc68221c851a9de4f5/src/main/java/org/apache/commons/io/output/WriterOutputStream.java
Attributes
- Graph
- Supertypes
- class OutputStreamtrait Flushabletrait Closeabletrait AutoCloseableclass Objecttrait Matchableclass Any
Inherited classlikes
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Implicits
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Compose this managed resource with another managed resource closing the outer one after the inner one
Value members
Concrete methods
Similar to the with
keyword in Python and using
keyword in .NET and try-with-resource
syntax in Java,
this let's you use and dispose a resource e.g.
Similar to the with
keyword in Python and using
keyword in .NET and try-with-resource
syntax in Java,
this let's you use and dispose a resource e.g.
{{ val lines: List[String] = using(file.newInputStream) { stream => stream.lines.toList // Must be eager so .toList } }}
Attributes
Inherited methods
Use this to create custom readers e.g. to read a LocalDate using some custom format val readLocalDate: Read[LocalDate] = Read.temporalQuery(format = myFormat, query = LocalDate.from)
Use this to create custom readers e.g. to read a LocalDate using some custom format val readLocalDate: Read[LocalDate] = Read.temporalQuery(format = myFormat, query = LocalDate.from)
Attributes
- Inherited from:
- Implicits
Concrete fields
Default array buffer size Seems like a good value used by JDK: (see: java.io.BufferedInputStream.DEFAULT_BUFFER_SIZE)
Default array buffer size Seems like a good value used by JDK: (see: java.io.BufferedInputStream.DEFAULT_BUFFER_SIZE)
Attributes
The Default charset used by better-files Note: It uses java.net.charset.Charset.DefaultCharset() in general but if the Default supports byte-order markers, it uses a more compliant version than the JDK one (see: https://github.com/pathikrit/better-files/issues/107)
The Default charset used by better-files Note: It uses java.net.charset.Charset.DefaultCharset() in general but if the Default supports byte-order markers, it uses a more compliant version than the JDK one (see: https://github.com/pathikrit/better-files/issues/107)
Attributes
Implicits
Inherited implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits
Attributes
- Inherited from:
- Implicits