com.mle.file

FileUtilities

object FileUtilities

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FileUtilities
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. var basePath: Path

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def copy(srcBase: Path, files: Set[Path], dest: Path): Set[Path]

    Copies the given files to a destination directory, where the files' subdirectory is calculated relative to the given base directory.

    Copies the given files to a destination directory, where the files' subdirectory is calculated relative to the given base directory.

    srcBase

    the base directory for the source files

    files

    the source files to copy

    dest

    the destination directory, so each source file is copied to dest / srcBase.relativize(file)

    returns

    the destination files

  10. def createFile(path: String): Unit

    Creates the file referenced by the specified path and any non-existing parent directories.

    Creates the file referenced by the specified path and any non-existing parent directories. No-ops if the file already exists.

    path

    the path to the file to create

    See also

    java.nio.file.Files, java.nio.file.Paths

  11. def diskUsagePercentage(path: Path): Int

    Calculates the amount of used disk space, in percentages, according to the formula: usable_space / total_space.

    Calculates the amount of used disk space, in percentages, according to the formula: usable_space / total_space. For example, if a 10 GB disk contains 3 GB of data, this method returns 30 for that disk.

    path

    the path to the disk or file store

    returns

    the amount of used disk space as a percentage [0,100] of the total disk space capacity, rounded up to the next integer

  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def fileToString(file: Path): String

  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def firstLine(path: Path): String

    Throws if the file doesn't exist/has no first line (?)

    Throws if the file doesn't exist/has no first line (?)

    path

    location of file

    returns

    the first line of the file at the specified location

  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  19. def init(appName: String): Unit

  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. val lineSep: String

  22. def listFiles(srcDir: Path, visitor: FileCollectingVisitor): Seq[Path]

  23. def listPaths(basePath: Path): Seq[Path]

    Performs a recursive search of files and directories under the given base path.

    Performs a recursive search of files and directories under the given base path.

    basePath

    the base directory

    returns

    The files and directories under the base directory. Directories precede any files they contain in the returned sequence.

  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  27. def pathTo(location: String): Path

  28. def propsToFile(props: String*): Seq[Path]

  29. def readerFrom[T](resource: String)(code: (Iterator[String]) ⇒ T): T

    Avoids io.

    Avoids io.Source.fromURI(uri) because it seems to fail unless the supplied URI points to a file.

    T
    resource
    code
    returns

  30. def readerFrom[T](path: Path)(code: (Iterator[String]) ⇒ T): T

  31. def rebase(file: Path, srcBase: Path, destBase: Path): Path

  32. def resourceToFile(resource: String): Option[Path]

    resource

    the resource to lookup and write to file

    returns

    the path wrapped in an option if it was written, None if no file was written because it already existed

  33. def stringToFile(str: String, file: Path): Unit

  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  35. val tempDir: Path

  36. def toString(): String

    Definition Classes
    AnyRef → Any
  37. val userDir: Path

  38. val userDirString: String

  39. val userHome: Path

  40. def verifyFileReadability(file: Path): Unit

  41. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. def writerTo(filename: Path)(op: (PrintWriter) ⇒ Unit): Unit

    filename

    the file to write to

    op

    the file writing code

    See also

    http://stackoverflow.com/a/4608061

  45. def writerTo(filename: String)(op: (PrintWriter) ⇒ Unit): Path

    filename

    the file to write to

    op

    the file writing code

    See also

    http://stackoverflow.com/a/4608061

Inherited from AnyRef

Inherited from Any

Ungrouped