Packages

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)

Type Members

  1. type Self = SftpFileDescriptor

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def /(name: String): FileDescriptor

    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
    Definition Classes
    AnyRef → Any
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def cd(pathString: String): FileDescriptor

    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
    Definition Classes
    RemoteFileDescriptor
  8. def children(names: String*): Self
    Definition Classes
    RemoteFileDescriptor
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  10. def delete(): Boolean

    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

    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
    Attributes
    protected
    Definition Classes
    SftpFileDescriptorRemoteFileDescriptor
  13. val elements: List[String]
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(other: Any): Boolean
    Definition Classes
    SftpFileDescriptor → Equals → AnyRef → Any
  16. def exists: Boolean

    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]
  18. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. val host: String
  21. val identity: Option[Identity]
  22. def isDirectory: Boolean

    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
    Definition Classes
    Any
  24. def lines(): Iterator[String]

    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]

    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]

    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

    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

    Creates intermediary directories

    Creates intermediary directories

    returns

    true if the creation of successful, false otherwise.

    Definition Classes
    SftpFileDescriptorFileDescriptor
  29. lazy val name: String
    Definition Classes
    RemoteFileDescriptor
  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. def parent(n: Int = 1): Self
    Definition Classes
    RemoteFileDescriptor
  34. val password: Option[String]
  35. lazy val path: String
    Definition Classes
    RemoteFileDescriptor
  36. val port: Int
  37. val root: String
    Attributes
    protected[this]
    Definition Classes
    SftpFileDescriptorRemoteFileDescriptor
  38. def sibling(f: (String) ⇒ String): FileDescriptor

    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

    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

    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(offset: Long = 0L): InputStream

    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
    SftpFileDescriptorFileDescriptor
  42. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  43. def toString(): String
    Definition Classes
    SftpFileDescriptor → AnyRef → Any
  44. def upload(inputStream: InputStream, length: Option[Long]): Boolean

    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

    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
  47. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  50. def withFileAttributes[A](f: (FileAttributes) ⇒ A): A
    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