import { AbstractSession , IHandlerParameters } from "@zowe/imperative" ; import { IZosFilesResponse , List } from "@zowe/zos-files-for-zowe-sdk" ; import { ZosFilesBaseHandler } from "../../ZosFilesBase.handler" ; export export default class FsHandler extends ZosFilesBaseHandler { public async processWithSession ( commandParameters , session ) { let response ; if ( commandParameters . arguments . path ) { response = await List . fsWithPath ( session , { path : commandParameters . arguments . path , fsname : null , maxLength : commandParameters . arguments . maxLength , responseTimeout : commandParameters . arguments . responseTimeout } ) ; } else { response = await List . fs ( session , { path : null , fsname : commandParameters . arguments . fsname , maxLength : commandParameters . arguments . maxLength , responseTimeout : commandParameters . arguments . responseTimeout } ) ; } commandParameters . response . data . setObj ( response ) ; commandParameters . response . format . output ( { fields : [ "name" , "mountpoint" ] , output : response . apiResponse . items , format : "table" } ) ; return response ; } }