Package

better

files

Permalink

package files

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. files
  2. Implicits
  3. Implicits
  4. Implicits
  5. Implicits
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class BomEncoder extends CharsetEncoder

    Permalink

    Encoder that writes the BOM for this charset

  2. implicit class BufferedReaderExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  3. implicit class DigestInputStreamExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  4. trait Disposable[-A] extends AnyRef

    Permalink

    A typeclass to denote a disposable resource

  5. class Dispose[A] extends AnyRef

    Permalink

    Given a disposable resource, this actually does the disposing

  6. implicit class DisposeableExtensions[A] extends AnyRef

    Permalink
    Definition Classes
    Implicits
  7. class File extends Serializable

    Permalink

    Scala wrapper around java.nio.files.Path

    Scala wrapper around java.nio.files.Path

    Annotations
    @SerialVersionUID()
  8. implicit class FileChannelExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  9. implicit class FileExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  10. abstract class FileMonitor extends Monitor

    Permalink

    Implementation of File.Monitor

  11. trait Implicits extends files.Dispose.FlatMap.Implicits with files.Scanner.Read.Implicits with files.Scanner.Source.Implicits

    Permalink

    Container for various implicits

  12. implicit class InputStreamExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  13. implicit class IteratorExtensions[A] extends AnyRef

    Permalink
    Definition Classes
    Implicits
  14. implicit class JStreamExtensions[A] extends AnyRef

    Permalink
    Definition Classes
    Implicits
  15. implicit class ObjectInputStreamExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  16. implicit class ObjectOutputStreamExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  17. implicit class OutputStreamExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  18. implicit class PathMatcherExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  19. implicit class PrintWriterExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  20. implicit class ReaderExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  21. class ReaderInputStream extends InputStream

    Permalink

    Code ported from Java to Scala: https://github.com/apache/commons-io/blob/c0eb48f7e83987c5ed112b82f0d651aff5149ae4/src/main/java/org/apache/commons/io/input/ReaderInputStream.java

  22. trait Resource extends AnyRef

    Permalink

    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.

    Example:
    1. // 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

    ClassLoader#getResource

    Class#getResource

    Different ways of loading a file as an InputStream

    Resource

  23. trait Scannable[A] extends AnyRef

    Permalink

    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.

  24. trait Scanner extends Iterator[String] with AutoCloseable

    Permalink
  25. implicit class StringExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  26. implicit class StringInterpolations extends AnyRef

    Permalink
    Definition Classes
    Implicits
  27. trait StringSplitter extends AnyRef

    Permalink
  28. implicit class SymbolExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  29. class TeeOutputStream extends OutputStream

    Permalink

    Write to multiple outputstreams at once If error happens on any one while doing an operation, only the last error is reported

  30. implicit class URIExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  31. implicit class URLExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  32. class UnicodeCharset extends Charset

    Permalink

    A Unicode charset that handles byte-order markers

  33. class UnicodeDecoder extends CharsetDecoder

    Permalink

    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

  34. implicit class WriterExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  35. class WriterOutputStream extends OutputStream

    Permalink

    Code ported from Java to Scala: https://github.com/apache/commons-io/blob/d357d9d563c4a34fa2ab3cdc68221c851a9de4f5/src/main/java/org/apache/commons/io/output/WriterOutputStream.java

  36. implicit class ZipEntryExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  37. implicit class ZipInputStreamExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits
  38. implicit class ZipOutputStreamExtensions extends AnyRef

    Permalink
    Definition Classes
    Implicits

Value Members

  1. val DefaultBufferSize: Int

    Permalink

    Default array buffer size Seems like a good value used by JDK: (see: java.io.BufferedInputStream.DEFAULT_BUFFER_SIZE)

  2. val DefaultCharset: Charset

    Permalink

    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)

  3. object Disposable

    Permalink
  4. object Dispose

    Permalink
  5. object Dsl

    Permalink

    Do file ops using a UNIX command line DSL

  6. val EOF: Int

    Permalink
  7. object File extends Serializable

    Permalink
  8. object NullOutputStream extends OutputStream

    Permalink

    A sink outputstream similar to /dev/null - just consumes everything

  9. object Resource extends Resource with ResourceScalaCompat

    Permalink

    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.

    See also

    ClassLoader#getResource

    Class#getResource

    Different ways of loading a file as an InputStream

    Resource

  10. object Scannable

    Permalink
  11. object Scanner

    Permalink

    Faster, safer and more idiomatic Scala replacement for java.util.Scanner See: http://codeforces.com/blog/entry/7018

  12. object StringSplitter

    Permalink
  13. object UnicodeCharset

    Permalink
  14. implicit val bigDecimalRead: Read[BigDecimal]

    Permalink
    Definition Classes
    Implicits
  15. implicit val bigIntRead: Read[BigInt]

    Permalink
    Definition Classes
    Implicits
  16. implicit val booleanRead: Read[Boolean]

    Permalink
    Definition Classes
    Implicits
  17. implicit val bufferedReaderSource: Source[BufferedReader]

    Permalink
    Definition Classes
    Implicits
  18. implicit val byteRead: Read[Byte]

    Permalink
    Definition Classes
    Implicits
  19. implicit object disposeFlatMap extends FlatMap[Dispose]

    Permalink

    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
  20. implicit val doubleRead: Read[Double]

    Permalink
    Definition Classes
    Implicits
  21. implicit val durationRead: Read[Duration]

    Permalink
    Definition Classes
    Implicits
  22. implicit val floatRead: Read[Float]

    Permalink
    Definition Classes
    Implicits
  23. implicit def inputstreamSource(implicit charset: Charset = DefaultCharset): Source[InputStream]

    Permalink
    Definition Classes
    Implicits
  24. implicit val instantRead: Read[Instant]

    Permalink
    Definition Classes
    Implicits
  25. implicit val intRead: Read[Int]

    Permalink
    Definition Classes
    Implicits
  26. implicit val lineNumberReaderSource: Source[LineNumberReader]

    Permalink
    Definition Classes
    Implicits
  27. implicit val localDateRead: Read[LocalDate]

    Permalink
    Definition Classes
    Implicits
  28. implicit val localDateTimeRead: Read[LocalDateTime]

    Permalink
    Definition Classes
    Implicits
  29. implicit val longRead: Read[Long]

    Permalink
    Definition Classes
    Implicits
  30. implicit val monthDayRead: Read[MonthDay]

    Permalink
    Definition Classes
    Implicits
  31. implicit val offsetDateTimeRead: Read[OffsetDateTime]

    Permalink
    Definition Classes
    Implicits
  32. implicit val offsetTimeRead: Read[OffsetTime]

    Permalink
    Definition Classes
    Implicits
  33. implicit def optionRead[A](implicit arg0: Read[A]): Read[Option[A]]

    Permalink
    Definition Classes
    Implicits
  34. implicit val periodRead: Read[Period]

    Permalink
    Definition Classes
    Implicits
  35. implicit val readerSource: Source[Reader]

    Permalink
    Definition Classes
    Implicits
  36. implicit val shortRead: Read[Short]

    Permalink
    Definition Classes
    Implicits
  37. implicit val sqlDateRead: Read[Date]

    Permalink
    Definition Classes
    Implicits
  38. implicit val sqlTimeRead: Read[Time]

    Permalink
    Definition Classes
    Implicits
  39. implicit val sqlTimestampRead: Read[Timestamp]

    Permalink
    Definition Classes
    Implicits
  40. implicit val stringRead: Read[String]

    Permalink
    Definition Classes
    Implicits
  41. implicit val stringSource: Source[String]

    Permalink
    Definition Classes
    Implicits
  42. implicit def stringToCharset(charsetName: String): Charset

    Permalink
    Definition Classes
    Implicits
  43. implicit def stringToMessageDigest(algorithmName: String): MessageDigest

    Permalink
    Definition Classes
    Implicits
  44. def temporalQuery[A](format: DateTimeFormatter, query: TemporalQuery[A]): Read[A]

    Permalink

    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
  45. implicit def tokenizerToIterator(s: StringTokenizer): Iterator[String]

    Permalink
    Definition Classes
    Implicits
  46. implicit object traversableFlatMap extends FlatMap[GenTraversableOnce]

    Permalink

    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
  47. def using[A, B](resource: A)(f: (A) ⇒ B)(implicit arg0: Disposable[A]): B

    Permalink

    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 } }}

  48. implicit val yearMonthRead: Read[YearMonth]

    Permalink
    Definition Classes
    Implicits
  49. implicit val yearRead: Read[Year]

    Permalink
    Definition Classes
    Implicits
  50. implicit val zonedDateTimeRead: Read[ZonedDateTime]

    Permalink
    Definition Classes
    Implicits

Inherited from Implicits

Inherited from AnyRef

Inherited from Any

Ungrouped