Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Upload

Hierarchy

  • Upload

Index

Accessors

Static Private log

  • get log(): Logger

Methods

Static bufferToDataSet

Static bufferToUSSFile

  • bufferToUSSFile(session: AbstractSession, ussname: string, buffer: Buffer, binary?: boolean, localEncoding?: string, etag?: string, returnEtag?: boolean, responseTimeout?: number): Promise<string>
  • Upload content to USS file

    deprecated

    In favor of bufferToUssFile() which implements IUploadOptions

    Parameters

    • session: AbstractSession

      z/OS connection info

    • ussname: string

      Name of the USS file to write to

    • buffer: Buffer

      Data to be written

    • Default value binary: boolean = false

      The indicator to upload the file in binary mode

    • Optional localEncoding: string
    • Optional etag: string
    • Optional returnEtag: boolean
    • Optional responseTimeout: number

    Returns Promise<string>

Static bufferToUssFile

  • bufferToUssFile(session: AbstractSession, ussname: string, buffer: Buffer, options?: IUploadOptions): Promise<string>

Static dirToPds

Static dirToUSSDir

Static dirToUSSDirRecursive

Static fileToDataset

Static fileToUSSFile

  • fileToUSSFile(session: AbstractSession, inputFile: string, ussname: string, binary?: boolean, localEncoding?: string, task?: ITaskWithStatus, etag?: string, returnEtag?: boolean): Promise<IZosFilesResponse>
  • deprecated

    In favor of fileToUssFile() which implements IUploadOptions

    Parameters

    • session: AbstractSession
    • inputFile: string
    • ussname: string
    • Default value binary: boolean = false
    • Optional localEncoding: string
    • Optional task: ITaskWithStatus
    • Optional etag: string
    • Optional returnEtag: boolean

    Returns Promise<IZosFilesResponse>

Static fileToUssFile

Static Private formatStringForDisplay

  • formatStringForDisplay(stringInput: string): string

Static Private generateHeadersBasedOnOptions

  • generateHeadersBasedOnOptions(options: IUploadOptions, context?: string): IHeaderContent[]

Static Private getDirs

Static Private hasDirs

  • hasDirs(dirPath: string): boolean

Static isDirectoryExist

  • isDirectoryExist(session: AbstractSession, ussname: string): Promise<boolean>

Static pathToDataSet

  • Upload content from input path to dataSet or PDS members

    throws

    {ImperativeError} When encounter error scenarios.

    example

    pathToDataSet(session, "file.txt", "ps.name")

    example

    pathToDataset(session, "file.txt", "psd.name(member)")

    example

    pathToDataSet(session, "directory", "pds.name")

    example

    pathToDataset(session, "/full/path/file.txt", "ps.name")

    Note: This method does everything needed to do from checking if path is file or directory and if data set is sequential file or PDS to determine what name to be used when upload content to data set. All you have to specify is a directory and a dsname.

    Parameters

    • session: AbstractSession

      z/OS connection info

    • inputPath: string

      User input path to file or directory

    • dataSetName: string

      Name of the data set to write to

    • Default value options: IUploadOptions = {}

    Returns Promise<IZosFilesResponse>

    A response indicating the out come

Static streamToDataSet

Static streamToUSSFile

  • streamToUSSFile(session: AbstractSession, ussname: string, uploadStream: Readable, binary?: boolean, localEncoding?: string, task?: ITaskWithStatus, etag?: string): Promise<{ apiResponse: any; commandResponse: string; success: boolean }>
  • Upload content to USS file

    deprecated
    • In favor of streamToUssFile() which implements IUploadOptions

    Parameters

    • session: AbstractSession

      z/OS connection info

    • ussname: string

      Name of the USS file to write to

    • uploadStream: Readable

      Data to be written

    • Default value binary: boolean = false

      The indicator to upload the file in binary mode

    • Optional localEncoding: string
    • Optional task: ITaskWithStatus
    • Optional etag: string

    Returns Promise<{ apiResponse: any; commandResponse: string; success: boolean }>

Static streamToUssFile

  • streamToUssFile(session: AbstractSession, ussname: string, uploadStream: Readable, options?: IUploadOptions): Promise<{ apiResponse: any; commandResponse: string; success: boolean }>
  • Upload content to USS file

    Parameters

    • session: AbstractSession

      z/OS connection info

    • ussname: string

      Name of the USS file to write to

    • uploadStream: Readable

      Data to be written

    • Default value options: IUploadOptions = {}

    Returns Promise<{ apiResponse: any; commandResponse: string; success: boolean }>

    • A response indicating the outcome

Static Private uploadFile

  • uploadFile(localPath: string, ussPath: string, session: AbstractSession, options: IUploadOptions): Promise<void>

Static Private uploadFileAndTagBasedOnAttributes

  • uploadFileAndTagBasedOnAttributes(localPath: string, ussPath: string, session: AbstractSession, attributes: ZosFilesAttributes): Promise<void>

Generated using TypeDoc