### Hierarchy

- Utilities

## Index

### Methods

- applyTaggedEncoding
- chtag
- isFileTagBinOrAscii
- putUSSPayload
- renameUSSFile

## Methods

### Static applyTaggedEncoding

- applyTaggedEncoding(session: AbstractSession, USSFileName: string, options: IOptions, responseTimeout?: number): Promise<void>

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/utilities/Utilities.ts:142

  Check the tags on an existing USS file and update binary and encoding properties on the options object.

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### USSFileName: string

    Path to USS file

  - ##### options: IOptions

    Options for downloading a USS file

  - ##### Optional responseTimeout: number

  #### Returns Promise<void>

### Static chtag

- chtag(session: AbstractSession, ussFileName: string, type: Tag, codeset?: string, responseTimeout?: number): Promise<IZosFilesResponse>

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/utilities/Utilities.ts:72

  Changes the tag attributes associate with a file using function chtag

  This function uses a JSON payload to set the information via zosmf utilities function

  throws

    {ImperativeError}

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### ussFileName: string

  - ##### type: Tag

    enum of chtag type of Test, Binary or Mixed

  - ##### Optional codeset: string

    optional string describing codeset e.g. IBM-1047

  - ##### Optional responseTimeout: number

  #### Returns Promise<IZosFilesResponse>

  Promise that resolves to response object

### Static isFileTagBinOrAscii

- isFileTagBinOrAscii(session: AbstractSession, USSFileName: string, responseTimeout?: number): Promise<boolean>

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/utilities/Utilities.ts:117

  Based upon the files chtag value. Identify how the tagging should be interpretted when transferring the contents For example an EBCDIC file would always be converted from it's EBCDIC value to the ASCII

  An ASCII file value or binary should not be converted.

  The default value if the tag is not set or in an invalid state correctly is to convert.

  throws

    {ImperativeError}

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### USSFileName: string

    contains the file name

  - ##### Optional responseTimeout: number

  #### Returns Promise<boolean>

  Promise that resolves to true if the file is binary or ASCII text or false if file should likely be converted to text. Default is false which aligns with the zosmf default behavior converting

### Static putUSSPayload

- putUSSPayload(session: AbstractSession, USSFileName: string, payload: any, responseTimeout?: number): Promise<Buffer>

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/utilities/Utilities.ts:36

  Retrieve various details from USS file functions

  This function uses a JSON payload to retrieve information via zosmf utilities function

  throws

    {ImperativeError}

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### USSFileName: string

    contains the file name

  - ##### payload: any

    contains the options to be sent

  - ##### Optional responseTimeout: number

  #### Returns Promise<Buffer>

  Promise that resolves to json information

### Static renameUSSFile

- renameUSSFile(session: AbstractSession, USSFilePath: string, newFilePath: string, responseTimeout?: number): Promise<Buffer>

- - Defined in @zowe/zos-files-for-zowe-sdk/src/methods/utilities/Utilities.ts:173

  Re-name USS file or directory

  throws

    {ImperativeError}

  #### Parameters

  - ##### session: AbstractSession

    z/OSMF connection info

  - ##### USSFilePath: string

    contains the current filepath

  - ##### newFilePath: string

    contains the new filepath

  - ##### Optional responseTimeout: number

  #### Returns Promise<Buffer>

  Promise that resolves to json information

Generated using TypeDoc