Trait/Object

eu.shiftforward.apso.io

FileDescriptor

Related Docs: object FileDescriptor | package io

Permalink

trait FileDescriptor extends AnyRef

A representation of a file stored in an arbitrary location. A descriptor includes logic to copy files to and from a local filesystem, as well as filesystem navigation logic.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FileDescriptor
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def child(name: String): FileDescriptor

    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

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

  3. abstract def download(localTarget: LocalFileDescriptor, safeDownloading: Boolean = false): 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.

  4. abstract 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

  5. abstract 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

  6. abstract def list: Iterator[FileDescriptor]

    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

  7. abstract def listAllFilesWithPrefix(prefix: String): Iterator[FileDescriptor]

    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

  8. abstract def mkdirs(): Boolean

    Permalink

    Creates intermediary directories

    Creates intermediary directories

    returns

    true if the creation of successful, false otherwise.

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

  10. abstract def parent(n: Int = 1): FileDescriptor

    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.

  11. abstract def 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.

  12. abstract def size: Long

    Permalink

    The size of the file associated with the file descriptor.

  13. abstract def stream(): InputStream

    Permalink

    Returns an input stream for the contents of this file.

    Returns an input stream for the contents of this file.

    returns

    an input stream for the contents of this file.

  14. abstract 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.

  15. abstract 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.

Concrete 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): FileDescriptor

    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

  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): FileDescriptor

    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

  7. def children(names: String*): FileDescriptor

    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

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. 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.

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

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

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

    Permalink
    Definition Classes
    AnyRef
  19. def sibling(f: (String) ⇒ 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

    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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped