Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FtpFileJob

Hierarchy

Index

Constructors

constructor

Properties

Protected e

Protected file

file: File

Protected id

id: string

Protected lifeCycle

lifeCycle: LifeEvent[]

Protected locallyAvailable

locallyAvailable: boolean

Protected name

name: string

Protected nest

nest: Nest

Protected tunnel

tunnel: Tunnel

Methods

Protected createLifeEvent

  • createLifeEvent(verb: string, start: string, finish: string): void

email

fail

  • fail(reason: string): void
  • Function to call to fail a job while in a tunnel.

    Parameters

    • reason: string

    Returns void

getBasename

  • getBasename(): string

getContentType

  • getContentType(): string

getDirname

  • getDirname(): string

getExtension

  • getExtension(): string

getFile

getId

  • getId(): string

getLifeCycle

getName

  • getName(): string

getNameProper

  • getNameProper(): any

getNest

getPath

  • getPath(): string

getTunnel

isFile

  • isFile(): boolean

isFolder

  • isFolder(): boolean

isLocallyAvailable

  • isLocallyAvailable(): boolean

move

  • move(destinationNest: any, callback: any): void
  • Moves a file to a nest. This is an asynchronous method which provides a callback on completion.

    Parameters

    • destinationNest: any

      The nest object the job will be sent to.

    • callback: any

      The callback provides the updated instance of the job. Depending on the nest it was sent to, it may have been cast to a new job type. This is helpful in case you need the remote path to the job once it has been uploaded to S3, for example.

      Example

      tunnel.run((job, nest) => {
           console.log("Found job " + job.getName());
           job.move(my_s3_bucket, (s3_job) => {
               // Uploaded
               console.log("Uploaded to " + s3_job.getPath());
           });
      });
      

    Returns void

rename

  • rename(newName: string): void

setLocallyAvailable

  • setLocallyAvailable(available: boolean): void

setName

  • setName(filename: string): void

setNest

  • setNest(nest: Nest): void

setPath

  • setPath(path: string): void

setTunnel

  • setTunnel(tunnel: Tunnel): void

toString

  • toString(): string

transfer

  • transfer(tunnel: Tunnel): void

Generated using TypeDoc