Class

eu.shiftforward.apso.io

LocalFileDescriptor

Related Doc: package io

Permalink

case class LocalFileDescriptor(initialPath: String) extends FileDescriptor with Logging with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, Logging, FileDescriptor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LocalFileDescriptor
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Logging
  7. FileDescriptor
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LocalFileDescriptor(initialPath: String)

    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 /(name: String): LocalFileDescriptor

    Permalink

    Adds a new child node to the filesystem path.

    Adds a new child node to the filesystem path.

    name

    the node name.

    returns

    the new file descriptor with the updated path

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

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

    Permalink
    Definition Classes
    Any
  6. def cd(pathString: String): LocalFileDescriptor

    Permalink

    Changes the path of the file descriptor using unix's cd syntax related to the current directory.

    Changes the path of the file descriptor using unix's cd syntax related to the current directory. Ex: Go back to directories: ../.. Go to child directories: foo/bar Go to sibling directory: ../foo Absolute path changes are not supported.

    pathString

    the cd command

    returns

    the new file descriptor with the updated path

    Definition Classes
    LocalFileDescriptorFileDescriptor
  7. def child(name: String): LocalFileDescriptor

    Permalink

    Adds a new child node to the filesystem path.

    Adds a new child node to the filesystem path.

    name

    the node name.

    returns

    the new file descriptor with the updated path

    Definition Classes
    LocalFileDescriptorFileDescriptor
  8. def children(names: String*): LocalFileDescriptor

    Permalink

    Adds multiple new child nodes to the filesystem path.

    Adds multiple new child nodes to the filesystem path.

    names

    the node names to add.

    returns

    the new file descriptor with the updated path

    Definition Classes
    LocalFileDescriptorFileDescriptor
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def delete(): Boolean

    Permalink

    Deletes the file associated with the file descriptor

    Deletes the file associated with the file descriptor

    returns

    true if the delete was successful, false otherwise.

    Definition Classes
    LocalFileDescriptorFileDescriptor
  11. def deleteDir(): Boolean

    Permalink

    Deletes the directory associated with the file descriptor by recursively deleting all the directories and files inside it.

    Deletes the directory associated with the file descriptor by recursively deleting all the directories and files inside it. Symbolic links are not followed and are just deleted as "regular" files.

    returns

    true if the delete was successful, false otherwise.

  12. def download(localTarget: LocalFileDescriptor, safeDownloading: Boolean): Boolean

    Permalink

    Downloads the file to the given local destination.

    Downloads the file to the given local destination. Both the source and the destination must point to a file.

    localTarget

    the local destination to which this file should be downloaded. The path must be absolute path to the final file.

    safeDownloading

    downloads the file to filename + ".tmp" and renames it to the original name if the download was successful.

    returns

    true if the download was successful, false otherwise.

    Definition Classes
    LocalFileDescriptorFileDescriptor
  13. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    LocalFileDescriptor → Equals → AnyRef → Any
  15. def exists: Boolean

    Permalink

    Returns true if the file pointed by the file descriptor exists

    Returns true if the file pointed by the file descriptor exists

    returns

    true if the file pointed by the file descriptor exists

    Definition Classes
    LocalFileDescriptorFileDescriptor
  16. lazy val file: File

    Permalink
  17. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  19. val initialPath: String

    Permalink
  20. def isDirectory: Boolean

    Permalink

    Returns true if the fd points to a directory

    Returns true if the fd points to a directory

    returns

    true if the fd points to a directory

    Definition Classes
    LocalFileDescriptorFileDescriptor
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. def lines(): Iterator[String]

    Permalink

    Returns an iterator with the lines of this file.

    Returns an iterator with the lines of this file.

    returns

    an iterator with the lines of this file.

    Definition Classes
    FileDescriptor
  23. def list: Iterator[LocalFileDescriptor]

    Permalink

    Lists the files in the current file descriptor directory

    Lists the files in the current file descriptor directory

    returns

    a iterator of file descriptors

    Definition Classes
    LocalFileDescriptorFileDescriptor
  24. def listAllFilesWithPrefix(prefix: String): Iterator[LocalFileDescriptor]

    Permalink

    Lists all files down the file hierarchy tree that whose relative path match the given prefix

    Lists all files down the file hierarchy tree that whose relative path match the given prefix

    prefix

    the prefix to match given each file relative path to the current directory

    returns

    a iterator of file descriptors

    Definition Classes
    LocalFileDescriptorFileDescriptor
  25. lazy val log: Logger

    Permalink

    The Logger object.

    The Logger object. This logger will have the same name as the concrete class into which this trait is mixed-in.

    Definition Classes
    Logging
  26. def mkdirs(): Boolean

    Permalink

    Creates intermediary directories

    Creates intermediary directories

    returns

    true if the creation of successful, false otherwise.

    Definition Classes
    LocalFileDescriptorFileDescriptor
  27. lazy val name: String

    Permalink

    The name of the file associated with the file descriptor.

    The name of the file associated with the file descriptor.

    returns

    the file name.

    Definition Classes
    LocalFileDescriptorFileDescriptor
  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  31. def parent(n: Int): LocalFileDescriptor

    Permalink

    Returns the file descriptor n node up in the filesystem path.

    Returns the file descriptor n node up in the filesystem path.

    n

    the number of parent nodes to go back.

    returns

    the file descriptor n node up in the filesystem path.

    Definition Classes
    LocalFileDescriptorFileDescriptor
  32. lazy val path: String

    Permalink

    Returns the unique identifier of this file in its location.

    Returns the unique identifier of this file in its location.

    returns

    the unique identifier of this file in its location.

    Definition Classes
    LocalFileDescriptorFileDescriptor
  33. def readString: String

    Permalink

    Reads the file pointed by the file descriptor and returns it in string format

    Reads the file pointed by the file descriptor and returns it in string format

    returns

    the contents of the file in string format

  34. def rename(to: LocalFileDescriptor): Option[LocalFileDescriptor]

    Permalink

    Renames the file pointed by the file descriptor

    Renames the file pointed by the file descriptor

    to

    the file descriptor to be renamed to

    returns

    a Some of the renamed file descriptor if successful, otherwise None.

  35. def sibling(f: (String) ⇒ String): LocalFileDescriptor

    Permalink

    Returns a new file descriptor pointing to a sibling of the current file descriptor

    Returns a new file descriptor pointing to a sibling of the current file descriptor

    f

    a function that returns a new name from the current name of the file descriptor

    returns

    a new file descriptor pointing to a sibling of the current file descriptor

    Definition Classes
    LocalFileDescriptorFileDescriptor
  36. def sibling(name: String): FileDescriptor

    Permalink

    Returns a new file descriptor pointing to a sibling of the current file descriptor

    Returns a new file descriptor pointing to a sibling of the current file descriptor

    name

    the file name of the new file descriptor

    returns

    a new file descriptor pointing to a sibling of the current file descriptor

    Definition Classes
    FileDescriptor
  37. def size: Long

    Permalink

    The size of the file associated with the file descriptor.

    The size of the file associated with the file descriptor.

    Definition Classes
    LocalFileDescriptorFileDescriptor
  38. def stream(offset: Long = 0L): FileInputStream

    Permalink

    Returns an input stream for the contents of this file.

    Returns an input stream for the contents of this file.

    offset

    bytes to skip before reading the file.

    returns

    an input stream for the contents of this file.

    Definition Classes
    LocalFileDescriptorFileDescriptor
  39. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  40. def toString(): String

    Permalink
    Definition Classes
    LocalFileDescriptor → AnyRef → Any
  41. def upload(inputStream: InputStream, length: Option[Long]): Boolean

    Permalink

    Uploads an input stream to this file's location.

    Uploads an input stream to this file's location. The target must point to a file.

    inputStream

    the input stream that should be uploaded.

    length

    the input stream length (leaving this as None can have performance implications)

    returns

    true if the upload was successful, false otherwise.

    Definition Classes
    LocalFileDescriptorFileDescriptor
  42. def upload(localTarget: LocalFileDescriptor): Boolean

    Permalink

    Uploads a local file to this file's location.

    Uploads a local file to this file's location. Both the source and the target must point to a file.

    localTarget

    the local file that should be uploaded. The path must be absolute path to the final file.

    returns

    true if the upload was successful, false otherwise.

    Definition Classes
    LocalFileDescriptorFileDescriptor
  43. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. def write(byteArray: Array[Byte]): Unit

    Permalink

    Writes the given byteArray to file pointed by the file descriptor

    Writes the given byteArray to file pointed by the file descriptor

    byteArray

    the byte array to write to the file

  47. def write(str: String): Unit

    Permalink

    Writes the given string str to the file pointed by the file descriptor

    Writes the given string str to the file pointed by the file descriptor

    str

    the string to write to the file

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Logging

Inherited from FileDescriptor

Inherited from AnyRef

Inherited from Any

Ungrouped