com.mle.file

FileUtilities

Related Doc: package file

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: Any): Boolean

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

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. var basePath: Path

  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. 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

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

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

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

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

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

  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. 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

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

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

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

  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. val lineSep: String

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

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

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

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

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

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

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

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

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

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

    T
    resource
    code
    returns

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

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

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

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

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

    Definition Classes
    AnyRef
  33. val tempDir: Path

  34. def toString(): String

    Definition Classes
    AnyRef → Any
  35. val userDir: Path

  36. val userDirString: String

  37. val userHome: Path

  38. def verifyFileReadability(file: Path): Unit

  39. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. 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

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