Class/Object

eu.shiftforward.apso.io

SftpFileDescriptor

Related Docs: object SftpFileDescriptor | package io

Permalink

case class SftpFileDescriptor(host: String, port: Int, username: String, password: Option[String], elements: List[String], identity: Option[Identity], _fileAttributes: Option[FileAttributes] = None) extends FileDescriptor with RemoteFileDescriptor with Logging with Product with Serializable

A FileDescriptor for files served over SFTP. This file descriptor only supports absolute paths. The SSH connections for a given host are pooled.

The URI for this FileDescriptor should be in the format: - sftp://<username>@<hostname>:<port>/<absolute-path>

Both the username and port are optional. Additionally, the credentials config expects an object with the following format:

sftp { default = { username = <username> password = <password> } }

Or if using public key authentication: sftp { default = { username = <username> keypair-file = <key filename> passphrase = <passphrase> } }

What is considered as an id for credentials handling is the hostname of the file descriptor, therefore it is possible to provide credentials for a specific hostname.

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

Instance Constructors

  1. new SftpFileDescriptor(host: String, port: Int, username: String, password: Option[String], elements: List[String], identity: Option[Identity], _fileAttributes: Option[FileAttributes] = None)

    Permalink

Type Members

  1. type Self = SftpFileDescriptor

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

    Definition Classes
    FileDescriptor
  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

    Definition Classes
    FileDescriptor
  7. def child(name: String): Self

    Permalink
    Definition Classes
    RemoteFileDescriptor
  8. def children(names: String*): Self

    Permalink
    Definition Classes
    RemoteFileDescriptor
  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
    SftpFileDescriptorFileDescriptor
  11. 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
    SftpFileDescriptorFileDescriptor
  12. def duplicate(elements: List[String]): SftpFileDescriptor

    Permalink
    Attributes
    protected
    Definition Classes
    SftpFileDescriptorRemoteFileDescriptor
  13. val elements: List[String]

    Permalink
  14. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    SftpFileDescriptor → Equals → AnyRef → Any
  16. 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
    SftpFileDescriptorFileDescriptor
  17. def fileAttributes: Option[FileAttributes]

    Permalink
  18. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  20. val host: String

    Permalink
  21. val identity: Option[Identity]

    Permalink
  22. 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
    SftpFileDescriptorFileDescriptor
  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. 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
  25. def list: Iterator[SftpFileDescriptor]

    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
    SftpFileDescriptorFileDescriptor
  26. def listAllFilesWithPrefix(prefix: String): Iterator[SftpFileDescriptor]

    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
    SftpFileDescriptorFileDescriptor
  27. 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
  28. def mkdirs(): Boolean

    Permalink

    Creates intermediary directories

    Creates intermediary directories

    returns

    true if the creation of successful, false otherwise.

    Definition Classes
    SftpFileDescriptorFileDescriptor
  29. lazy val name: String

    Permalink
    Definition Classes
    RemoteFileDescriptor
  30. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  33. def parent(n: Int = 1): Self

    Permalink
    Definition Classes
    RemoteFileDescriptor
  34. val password: Option[String]

    Permalink
  35. lazy val path: String

    Permalink
    Definition Classes
    RemoteFileDescriptor
  36. val port: Int

    Permalink
  37. val root: String

    Permalink
    Attributes
    protected[this]
    Definition Classes
    SftpFileDescriptorRemoteFileDescriptor
  38. 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

    Definition Classes
    FileDescriptor
  39. 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
  40. 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
    SftpFileDescriptorFileDescriptor
  41. 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.

    Definition Classes
    SftpFileDescriptorFileDescriptor
  42. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    SftpFileDescriptor → AnyRef → Any
  44. 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
    SftpFileDescriptorFileDescriptor
  45. 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
    SftpFileDescriptorFileDescriptor
  46. val username: String

    Permalink
  47. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. def withFileAttributes[A](f: (FileAttributes) ⇒ A): A

    Permalink
    Attributes
    protected

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Logging

Inherited from RemoteFileDescriptor

Inherited from FileDescriptor

Inherited from AnyRef

Inherited from Any

Ungrouped