p

better

files

package files

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

    Encoder that writes the BOM for this charset

  2. trait Disposable[-A] extends AnyRef

    A typeclass to denote a disposable resource

  3. class Dispose[A] extends AnyRef

    Given a disposable resource, this actually does the disposing

  4. class File extends Serializable

    Scala wrapper around java.nio.files.Path

    Scala wrapper around java.nio.files.Path

    Annotations
    @SerialVersionUID()
  5. abstract class FileMonitor extends Monitor

    Implementation of File.Monitor

  6. class FileWatcher extends Actor

    An actor that can watch a file or a directory Instead of directly calling the constructor of this, call file.newWatcher to create the actor

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

    Container for various implicits

  8. implicit class BufferedReaderExtensions extends AnyRef
    Definition Classes
    Implicits
  9. implicit class DigestInputStreamExtensions extends AnyRef
    Definition Classes
    Implicits
  10. implicit class DisposeableExtensions[A] extends AnyRef
    Definition Classes
    Implicits
  11. implicit class FileChannelExtensions extends AnyRef
    Definition Classes
    Implicits
  12. implicit class FileExtensions extends AnyRef
    Definition Classes
    Implicits
  13. implicit class InputStreamExtensions extends AnyRef
    Definition Classes
    Implicits
  14. implicit class IteratorExtensions[A] extends AnyRef
    Definition Classes
    Implicits
  15. implicit class JStreamExtensions[A] extends AnyRef
    Definition Classes
    Implicits
  16. implicit class ObjectInputStreamExtensions extends AnyRef
    Definition Classes
    Implicits
  17. implicit class ObjectOutputStreamExtensions extends AnyRef
    Definition Classes
    Implicits
  18. implicit class OutputStreamExtensions extends AnyRef
    Definition Classes
    Implicits
  19. implicit class PathMatcherExtensions extends AnyRef
    Definition Classes
    Implicits
  20. implicit class PrintWriterExtensions extends AnyRef
    Definition Classes
    Implicits
  21. implicit class ReaderExtensions extends AnyRef
    Definition Classes
    Implicits
  22. implicit class StringExtensions extends AnyRef
    Definition Classes
    Implicits
  23. implicit class StringInterpolations extends AnyRef
    Definition Classes
    Implicits
  24. implicit class SymbolExtensions extends AnyRef
    Definition Classes
    Implicits
  25. implicit class URIExtensions extends AnyRef
    Definition Classes
    Implicits
  26. implicit class URLExtensions extends AnyRef
    Definition Classes
    Implicits
  27. implicit class WriterExtensions extends AnyRef
    Definition Classes
    Implicits
  28. implicit class ZipEntryExtensions extends AnyRef
    Definition Classes
    Implicits
  29. implicit class ZipInputStreamExtensions extends AnyRef
    Definition Classes
    Implicits
  30. implicit class ZipOutputStreamExtensions extends AnyRef
    Definition Classes
    Implicits
  31. 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

  32. 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, 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

    Resource

    Different ways of loading a file as an InputStream

    Class#getResource

    ClassLoader#getResource

  33. 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.

  34. trait Scanner extends Iterator[String] with AutoCloseable
  35. trait StringSplitter extends AnyRef
  36. 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

  37. class UnicodeCharset extends Charset

    A Unicode charset that handles byte-order markers

  38. 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

  39. 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

  1. val DefaultBufferSize: Int

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

  2. 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)

  3. val EOF: Int
  4. implicit val bigDecimalRead: Read[BigDecimal]
    Definition Classes
    Implicits
  5. implicit val bigIntRead: Read[BigInt]
    Definition Classes
    Implicits
  6. implicit val booleanRead: Read[Boolean]
    Definition Classes
    Implicits
  7. implicit val bufferedReaderSource: Source[BufferedReader]
    Definition Classes
    Implicits
  8. implicit val byteRead: Read[Byte]
    Definition Classes
    Implicits
  9. implicit val doubleRead: Read[Double]
    Definition Classes
    Implicits
  10. implicit val durationRead: Read[Duration]
    Definition Classes
    Implicits
  11. implicit val floatRead: Read[Float]
    Definition Classes
    Implicits
  12. implicit def inputstreamSource(implicit charset: Charset = DefaultCharset): Source[InputStream]
    Definition Classes
    Implicits
  13. implicit val instantRead: Read[Instant]
    Definition Classes
    Implicits
  14. implicit val intRead: Read[Int]
    Definition Classes
    Implicits
  15. implicit val lineNumberReaderSource: Source[LineNumberReader]
    Definition Classes
    Implicits
  16. implicit val localDateRead: Read[LocalDate]
    Definition Classes
    Implicits
  17. implicit val localDateTimeRead: Read[LocalDateTime]
    Definition Classes
    Implicits
  18. implicit val longRead: Read[Long]
    Definition Classes
    Implicits
  19. implicit val monthDayRead: Read[MonthDay]
    Definition Classes
    Implicits
  20. implicit val offsetDateTimeRead: Read[OffsetDateTime]
    Definition Classes
    Implicits
  21. implicit val offsetTimeRead: Read[OffsetTime]
    Definition Classes
    Implicits
  22. implicit def optionRead[A](implicit arg0: Read[A]): Read[Option[A]]
    Definition Classes
    Implicits
  23. implicit val periodRead: Read[Period]
    Definition Classes
    Implicits
  24. implicit val readerSource: Source[Reader]
    Definition Classes
    Implicits
  25. implicit val shortRead: Read[Short]
    Definition Classes
    Implicits
  26. implicit val sqlDateRead: Read[Date]
    Definition Classes
    Implicits
  27. implicit val sqlTimeRead: Read[Time]
    Definition Classes
    Implicits
  28. implicit val sqlTimestampRead: Read[Timestamp]
    Definition Classes
    Implicits
  29. implicit val stringRead: Read[String]
    Definition Classes
    Implicits
  30. implicit val stringSource: Source[String]
    Definition Classes
    Implicits
  31. implicit def stringToCharset(charsetName: String): Charset
    Definition Classes
    Implicits
  32. implicit def stringToMessageDigest(algorithmName: String): MessageDigest
    Definition Classes
    Implicits
  33. 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
  34. implicit def tokenizerToIterator(s: StringTokenizer): Iterator[String]
    Definition Classes
    Implicits
  35. def using[A, B](resource: A)(f: (A) ⇒ B)(implicit arg0: Disposable[A]): B

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

  36. implicit val yearMonthRead: Read[YearMonth]
    Definition Classes
    Implicits
  37. implicit val yearRead: Read[Year]
    Definition Classes
    Implicits
  38. implicit val zonedDateTimeRead: Read[ZonedDateTime]
    Definition Classes
    Implicits
  39. object Disposable
  40. object Dispose
  41. 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
  42. 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
  43. object Dsl

    Do file ops using a UNIX command line DSL

  44. object File extends Serializable
  45. object FileWatcher
  46. object NullOutputStream extends OutputStream

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

  47. 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, 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

    Resource

    Different ways of loading a file as an InputStream

    Class#getResource

    ClassLoader#getResource

  48. object Scannable
  49. object Scanner

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

  50. object StringSplitter
  51. object UnicodeCharset

Inherited from Implicits

Inherited from AnyRef

Inherited from Any

Ungrouped