Class/Object

org.argus.jawa.core.io

File

Related Docs: object File | package io

Permalink

class File extends Path with io.Streamable.Chars

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.

Since

2.8 Note: This is library is considered experimental and should not be used unless you know what you are doing.

Linear Supertypes
Streamable.Chars, Bytes, Path, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. File
  2. Chars
  3. Bytes
  4. Path
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new File(jfile: JFile)(implicit constructorCodec: Codec)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def /(child: File): File

    Permalink
    Definition Classes
    Path
  4. def /(child: Directory): Directory

    Permalink
    Definition Classes
    Path
  5. def /(child: Path): Path

    Permalink

    Creates a new Path with the specified path appended.

    Creates a new Path with the specified path appended. Assumes the type of the new component implies the type of the result.

    Definition Classes
    Path
  6. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  7. def addExtension(ext: String): File

    Permalink
    Definition Classes
    FilePath
  8. def appendAll(strings: String*): Unit

    Permalink
  9. def applyReader[T](f: (BufferedReader) ⇒ T): T

    Permalink

    Creates a BufferedReader and applies the closure, automatically closing it on completion.

    Creates a BufferedReader and applies the closure, automatically closing it on completion.

    Definition Classes
    Chars
  10. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  11. def bufferedInput(): BufferedInputStream

    Permalink
    Definition Classes
    Bytes
  12. def bufferedOutput(append: Boolean = false): BufferedOutputStream

    Permalink
  13. def bufferedReader(codec: Codec): BufferedReader

    Permalink
    Definition Classes
    Chars
  14. def bufferedReader(): BufferedReader

    Permalink

    Wraps a BufferedReader around the result of reader().

    Wraps a BufferedReader around the result of reader().

    Definition Classes
    Chars
  15. def bufferedWriter(append: Boolean, codec: Codec): BufferedWriter

    Permalink
  16. def bufferedWriter(append: Boolean): BufferedWriter

    Permalink
  17. def bufferedWriter(): BufferedWriter

    Permalink

    Wraps a BufferedWriter around the result of writer().

  18. def bytes(): Iterator[Byte]

    Permalink
    Definition Classes
    Bytes
  19. def bytesAsInts(): Iterator[Int]

    Permalink
    Definition Classes
    Bytes
  20. def canRead: Boolean

    Permalink
    Definition Classes
    Path
  21. def canWrite: Boolean

    Permalink
    Definition Classes
    Path
  22. def changeExtension(ext: String): Path

    Permalink
    Definition Classes
    Path
  23. def chars(codec: Codec): BufferedSource

    Permalink
    Definition Classes
    Chars
  24. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def createDirectory(force: Boolean = true, failIfExists: Boolean = false): Directory

    Permalink
    Definition Classes
    Path
  26. def createFile(failIfExists: Boolean = false): File

    Permalink
    Definition Classes
    Path
  27. val creationCodec: Codec

    Permalink

    Calls to methods requiring byte<->char transformations should be offered in a form which allows specifying the codec.

    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.

    Definition Classes
    FileChars
  28. def delete(): Boolean

    Permalink
    Definition Classes
    Path
  29. def deleteRecursively(): Boolean

    Permalink

    Deletes the path recursively.

    Deletes the path recursively. Returns false on failure. Use with caution!

    Definition Classes
    Path
  30. def endsWith(other: Path): Boolean

    Permalink
    Definition Classes
    Path
  31. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  32. def equals(other: Any): Boolean

    Permalink
    Definition Classes
    Path → AnyRef → Any
  33. def exists: Boolean

    Permalink
    Definition Classes
    Path
  34. def extension: String

    Permalink
    Definition Classes
    Path
  35. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  36. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  37. def hasExtension(ext: String, exts: String*): Boolean

    Permalink
    Definition Classes
    Path
  38. def hashCode(): Int

    Permalink
    Definition Classes
    Path → AnyRef → Any
  39. def ifDirectory[T](f: (Directory) ⇒ T): Option[T]

    Permalink
    Definition Classes
    Path
  40. def ifFile[T](f: (File) ⇒ T): Option[T]

    Permalink
    Definition Classes
    Path
  41. def inputStream(): FileInputStream

    Permalink

    Obtains an InputStream.

    Obtains an InputStream.

    Definition Classes
    FileBytes
  42. def isAbsolute: Boolean

    Permalink
    Definition Classes
    Path
  43. def isDirectory: Boolean

    Permalink
    Definition Classes
    Path
  44. def isEmpty: Boolean

    Permalink
    Definition Classes
    Path
  45. def isFile: Boolean

    Permalink
    Definition Classes
    Path
  46. def isFresher(other: Path): Boolean

    Permalink
    Definition Classes
    Path
  47. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  48. def isSame(other: Path): Boolean

    Permalink
    Definition Classes
    Path
  49. val jfile: JFile

    Permalink
    Definition Classes
    Path
  50. def lastModified: Long

    Permalink
    Definition Classes
    Path
  51. def length: Long

    Permalink
    Definition Classes
    FileBytesPath
  52. def lines(codec: Codec): Iterator[String]

    Permalink
    Definition Classes
    Chars
  53. def lines(): Iterator[String]

    Permalink
    Definition Classes
    Chars
  54. def name: String

    Permalink
    Definition Classes
    Path
  55. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  56. def normalize: File

    Permalink
    Definition Classes
    FilePath
  57. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  58. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  59. def outputStream(append: Boolean = false): FileOutputStream

    Permalink

    Obtains a OutputStream.

  60. def parent: Directory

    Permalink

    returns

    The path of the parent directory, or root if path is already root

    Definition Classes
    Path
  61. def parents: List[Directory]

    Permalink
    Definition Classes
    Path
  62. def path: String

    Permalink
    Definition Classes
    Path
  63. def printWriter(): PrintWriter

    Permalink
  64. def printlnAll(strings: String*): Unit

    Permalink

    Calls println on each string (so it adds a newline in the PrintWriter fashion.)

  65. def reader(codec: Codec): InputStreamReader

    Permalink

    Obtains an InputStreamReader wrapped around a FileInputStream.

    Obtains an InputStreamReader wrapped around a FileInputStream.

    Definition Classes
    Chars
  66. def relativize(other: Path): Path

    Permalink
    Definition Classes
    Path
  67. def resolve(other: Path): Path

    Permalink
    Definition Classes
    Path
  68. def safeSlurp(): Option[String]

    Permalink
  69. def segments: List[String]

    Permalink
    Definition Classes
    Path
  70. val separator: Char

    Permalink
    Definition Classes
    Path
  71. val separatorStr: String

    Permalink
    Definition Classes
    Path
  72. def setExecutable(executable: Boolean, ownerOnly: Boolean = true): Boolean

    Permalink

    Reflection since we're into the java 6+ API.

  73. def slurp(codec: Codec): String

    Permalink
    Definition Classes
    Chars
  74. def slurp(): String

    Permalink

    Convenience function to import entire file into a String.

    Convenience function to import entire file into a String.

    Definition Classes
    Chars
  75. def stripExtension: String

    Permalink
    Definition Classes
    Path
  76. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  77. def toAbsolute: File

    Permalink
    Definition Classes
    FilePath
  78. def toAbsoluteWithRoot(root: Path): Path

    Permalink

    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.

    Definition Classes
    Path
  79. def toByteArray(): Array[Byte]

    Permalink

    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.

    Definition Classes
    Bytes
  80. def toCanonical: Path

    Permalink
    Definition Classes
    Path
  81. def toDirectory: Directory

    Permalink
    Definition Classes
    FilePath
  82. def toFile: File

    Permalink
    Definition Classes
    FilePath
  83. def toString(): String

    Permalink
    Definition Classes
    Path → AnyRef → Any
  84. def toURI: URI

    Permalink
    Definition Classes
    Path
  85. def toURL: URL

    Permalink
    Definition Classes
    Path
  86. def truncate(): Boolean

    Permalink
    Definition Classes
    Path
  87. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  88. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  89. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  90. def walk: Iterator[Path]

    Permalink

    Equivalent to walkFilter(_ => false).

    Equivalent to walkFilter(_ => false).

    Definition Classes
    Path
  91. def walkFilter(cond: (Path) ⇒ Boolean): Iterator[Path]

    Permalink

    If this path is a container, recursively iterate over its contents.

    If this path is a container, 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 true. So for example if the condition is true for some subdirectory, nothing under that directory will be in the Iterator; but otherwise each file and subdirectory underneath it will appear.

    Definition Classes
    FilePath
  92. def writeAll(strings: String*): Unit

    Permalink

    Creates a new file and writes all the Strings to it.

  93. def writer(append: Boolean, codec: Codec): OutputStreamWriter

    Permalink

    Obtains an OutputStreamWriter wrapped around a FileOutputStream.

    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.

Inherited from Streamable.Chars

Inherited from Bytes

Inherited from Path

Inherited from AnyRef

Inherited from Any

Ungrouped