package files
- Alphabetic
- By Inheritance
- files
- Implicits
- Implicits
- Implicits
- Implicits
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
BomEncoder extends CharsetEncoder
Encoder that writes the BOM for this charset
-
trait
Disposable[-A] extends AnyRef
A typeclass to denote a disposable resource
-
class
Dispose[A] extends AnyRef
Given a disposable resource, this actually does the disposing
-
class
File extends Serializable
Scala wrapper around java.nio.files.Path
Scala wrapper around java.nio.files.Path
- Annotations
- @SerialVersionUID()
-
abstract
class
FileMonitor extends Monitor
Implementation of File.Monitor
-
trait
Implicits extends files.Dispose.FlatMap.Implicits with files.Scanner.Read.Implicits with files.Scanner.Source.Implicits
Container for various implicits
-
implicit
class
BufferedReaderExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
DigestInputStreamExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
DisposeableExtensions[A] extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
FileChannelExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
FileExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
InputStreamExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
IteratorExtensions[A] extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
JStreamExtensions[A] extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
ObjectInputStreamExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
ObjectOutputStreamExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
OutputStreamExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
PathMatcherExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
PrintWriterExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
ReaderExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
StringExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
StringInterpolations extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
SymbolExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
WriterExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
ZipEntryExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
ZipInputStreamExtensions extends AnyRef
- Definition Classes
- Implicits
-
implicit
class
ZipOutputStreamExtensions extends AnyRef
- Definition Classes
- Implicits
-
class
ReaderInputStream extends InputStream
Code ported from Java to Scala: https://github.com/apache/commons-io/blob/c0eb48f7e83987c5ed112b82f0d651aff5149ae4/src/main/java/org/apache/commons/io/input/ReaderInputStream.java
-
trait
Resource extends AnyRef
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
, andmy
.at
searches from a Class,from
searches from a ClassLoader, andmy
searches from the class, trait, or object surrounding the call.// 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")
- See also
Example: -
trait
Scannable[A] extends AnyRef
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.
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.
- trait Scanner extends Iterator[String] with AutoCloseable
- trait StringSplitter extends AnyRef
-
class
TeeOutputStream extends OutputStream
Write to multiple outputstreams at once If error happens on any one while doing an operation, only the last error is reported
-
class
UnicodeCharset extends Charset
A Unicode charset that handles byte-order markers
-
class
UnicodeDecoder extends CharsetDecoder
A Unicode decoder that uses the Unicode byte-order marker (BOM) to auto-detect the encoding (if none detected, falls back on the defaultCharset).
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
-
class
WriterOutputStream extends OutputStream
Code ported from Java to Scala: https://github.com/apache/commons-io/blob/d357d9d563c4a34fa2ab3cdc68221c851a9de4f5/src/main/java/org/apache/commons/io/output/WriterOutputStream.java
Value Members
-
val
DefaultBufferSize: Int
Default array buffer size Seems like a good value used by JDK: (see: java.io.BufferedInputStream.DEFAULT_BUFFER_SIZE)
-
val
DefaultCharset: Charset
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)
- val EOF: Int
-
implicit
val
bigDecimalRead: Read[BigDecimal]
- Definition Classes
- Implicits
-
implicit
val
bigIntRead: Read[BigInt]
- Definition Classes
- Implicits
-
implicit
val
booleanRead: Read[Boolean]
- Definition Classes
- Implicits
-
implicit
val
bufferedReaderSource: Source[BufferedReader]
- Definition Classes
- Implicits
-
implicit
val
byteRead: Read[Byte]
- Definition Classes
- Implicits
-
implicit
val
doubleRead: Read[Double]
- Definition Classes
- Implicits
-
implicit
val
durationRead: Read[Duration]
- Definition Classes
- Implicits
-
implicit
val
floatRead: Read[Float]
- Definition Classes
- Implicits
-
implicit
def
inputstreamSource(implicit charset: Charset = DefaultCharset): Source[InputStream]
- Definition Classes
- Implicits
-
implicit
val
instantRead: Read[Instant]
- Definition Classes
- Implicits
-
implicit
val
intRead: Read[Int]
- Definition Classes
- Implicits
-
implicit
val
lineNumberReaderSource: Source[LineNumberReader]
- Definition Classes
- Implicits
-
implicit
val
localDateRead: Read[LocalDate]
- Definition Classes
- Implicits
-
implicit
val
localDateTimeRead: Read[LocalDateTime]
- Definition Classes
- Implicits
-
implicit
val
longRead: Read[Long]
- Definition Classes
- Implicits
-
implicit
val
monthDayRead: Read[MonthDay]
- Definition Classes
- Implicits
-
implicit
val
offsetDateTimeRead: Read[OffsetDateTime]
- Definition Classes
- Implicits
-
implicit
val
offsetTimeRead: Read[OffsetTime]
- Definition Classes
- Implicits
-
implicit
def
optionRead[A](implicit arg0: Read[A]): Read[Option[A]]
- Definition Classes
- Implicits
-
implicit
val
periodRead: Read[Period]
- Definition Classes
- Implicits
-
implicit
val
readerSource: Source[Reader]
- Definition Classes
- Implicits
-
implicit
val
shortRead: Read[Short]
- Definition Classes
- Implicits
-
implicit
val
sqlDateRead: Read[Date]
- Definition Classes
- Implicits
-
implicit
val
sqlTimeRead: Read[Time]
- Definition Classes
- Implicits
-
implicit
val
sqlTimestampRead: Read[Timestamp]
- Definition Classes
- Implicits
-
implicit
val
stringRead: Read[String]
- Definition Classes
- Implicits
-
implicit
val
stringSource: Source[String]
- Definition Classes
- Implicits
-
implicit
def
stringToCharset(charsetName: String): Charset
- Definition Classes
- Implicits
-
implicit
def
stringToMessageDigest(algorithmName: String): MessageDigest
- Definition Classes
- Implicits
-
def
temporalQuery[A](format: DateTimeFormatter, query: TemporalQuery[A]): Read[A]
Use this to create custom readers e.g.
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)
- Definition Classes
- Implicits
-
implicit
def
tokenizerToIterator(s: StringTokenizer): Iterator[String]
- Definition Classes
- Implicits
-
def
using[A, B](resource: A)(f: (A) ⇒ B)(implicit arg0: Disposable[A]): B
Similar to the
with
keyword in Python andusing
keyword in .NET andtry-with-resource
syntax in Java, this let's you use and dispose a resource e.g.Similar to the
with
keyword in Python andusing
keyword in .NET andtry-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 } }}
-
implicit
val
yearMonthRead: Read[YearMonth]
- Definition Classes
- Implicits
-
implicit
val
yearRead: Read[Year]
- Definition Classes
- Implicits
-
implicit
val
zonedDateTimeRead: Read[ZonedDateTime]
- Definition Classes
- Implicits
- object Disposable
- object Dispose
-
implicit
object
disposeFlatMap extends FlatMap[Dispose]
Compose this managed resource with another managed resource closing the outer one after the inner one
Compose this managed resource with another managed resource closing the outer one after the inner one
- Definition Classes
- Implicits
-
implicit
object
traversableFlatMap extends FlatMap[GenTraversableOnce]
Use the current managed resource as a generator needed to create another sequence
Use the current managed resource as a generator needed to create another sequence
- Definition Classes
- Implicits
-
object
Dsl
Do file ops using a UNIX command line DSL
- object File extends Serializable
-
object
NullOutputStream extends OutputStream
A sink outputstream similar to /dev/null - just consumes everything
-
object
Resource extends Resource
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
, andmy
.at
searches rom a Class,from
searches from a different ClassLoader, andmy
searches from the class, trait, or object surrounding the call. - object Scannable
-
object
Scanner
Faster, safer and more idiomatic Scala replacement for java.util.Scanner See: http://codeforces.com/blog/entry/7018
- object StringSplitter
- object UnicodeCharset