Options
All
  • Public
  • Public/Protected
  • All
Menu

Class JsFTPClient

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected _DISPOSABLES

_DISPOSABLES: vscode.Disposable[]

Stores disposable sub objects.

Protected _INTERVALS

_INTERVALS: Timer[]

Stores intervals.

Protected _TIMEOUTS

_TIMEOUTS: Timer[]

Stores timeouts.

Protected _connection

_connection: any

Stores the internal connection object / value.

isDisposed

isDisposed: boolean

Gets if object has been disposed or not.

isDisposing

isDisposing: boolean

Gets if the 'dispose()' method is currently executed or not.

isInFinalizeState

isInFinalizeState: boolean

Gets if the object is disposed or currently disposing.

options

Gets the underlying options.

values

values: Value[] = []

Stores the list of connection values.

Static defaultMaxListeners

defaultMaxListeners: number

Accessors

connection

  • get connection(): any

isConnected

  • get isConnected(): boolean

type

  • get type(): string

Methods

addListener

  • addListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

Protected cleanupIntervals

  • cleanupIntervals(): void
  • Cleansup all timeouts.

    Returns void

Protected cleanupTimeouts

  • cleanupTimeouts(): void
  • Cleansup all timeouts.

    Returns void

connect

  • connect(): Promise<boolean>

Protected createDirectoryIfNeeded

  • createDirectoryIfNeeded(dir: string): Promise<boolean>

Protected createParentDirectoryIfNeeded

  • createParentDirectoryIfNeeded(dir: string): Promise<boolean>

cwd

  • cwd(dir: string): Promise<void>

deleteFile

  • deleteFile(path: string): Promise<boolean>

dispose

  • dispose(): void
  • Dispose this object.

    Returns void

downloadFile

  • downloadFile(path: string): Promise<Buffer>

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

end

  • end(): Promise<boolean>

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

execute

  • execute(cmd: string): Promise<any>

executeCommandsBy

  • executeCommandsBy(provider: function, additionalValues?: Value | Value[]): Promise<Buffer[]>

get

  • get(file: string): Promise<Buffer>

getMaxListeners

  • getMaxListeners(): number
  • Returns number

Protected getValuesForFile

  • getValuesForFile(file: string): Value[]

list

listDirectory

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

mkdir

  • mkdir(dir: string): Promise<void>

Protected normalizeValueName

  • normalizeValueName(name: any): string

on

  • on(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

Protected onBeforeUpload

  • onBeforeUpload(path: string, data: Buffer): Promise<Buffer | false>
  • Invokes the event for an 'before upload' operation.

    Parameters

    • path: string

      The path of the remote file.

    • data: Buffer

      The data to upload.

    Returns Promise<Buffer | false>

Protected onDispose

  • onDispose(): void

Protected onUploadCompleted

  • onUploadCompleted(err: any, path: string, data: Buffer, hasBeenUploaded: boolean): Promise<void>
  • Invokes the event for an 'upload completed' operation.

    Parameters

    • err: any

      The error (if occurred).

    • path: string

      The path of the remote file.

    • data: Buffer

      The uploaded data.

    • hasBeenUploaded: boolean

      Indicates if file has been uploaded or not.

    Returns Promise<void>

once

  • once(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

put

  • put(file: string, data: Buffer): Promise<void>

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeFolder

  • removeFolder(path: string): Promise<boolean>

removeListener

  • removeListener(event: string | symbol, listener: Function): this
  • Parameters

    • event: string | symbol
    • listener: Function

    Returns this

rmdir

  • rmdir(path: string): Promise<void>

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

setValue

  • setValue(name: string, val: any): this
  • Sets a connection value.

    chainable

    Parameters

    • name: string

      The name of the value.

    • val: any

      The value to set.

    Returns this

    this

unlink

  • unlink(path: string): Promise<void>

uploadFile

  • uploadFile(path: string, data: Buffer): Promise<void>

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc