This class provides functions to retrieve profile-related information. It can load the relevant configuration files, merge all possible profile argument values using the Zowe order-of-precedence, and access desired profile attributes from the Zowe configuration settings.

Pseudocode examples:

       // Construct a new object. Use it to read the profiles from disk.
       // ProfileInfo functions throw a ProfInfoErr exception for errors.
       // You can catch those errors and test the errorCode for known
       // values. We are only showing the try/catch on the function
       // below, but it applies to any ProfileInfo function.
       profInfo = new ProfileInfo("zowe");
       try {
           await profInfo.readProfilesFromDisk();
       } catch(err) {
           if (err instanceof ProfInfoErr) {
               if (err.errcode == ProfInfoErr.CANT_GET_SCHEMA_URL) {
                   youTakeAnAlternateAction();
               } else {
                   // report the error
               }
           } else {
               // handle other exceptions
           }
       }

       // Maybe you want the list of all zosmf profiles
       let arrayOfProfiles = profInfo.getAllProfiles("zosmf");
       youDisplayTheListOfProfiles(arrayOfProfiles);

       // Maybe you want the default zosmf profile
       let zosmfProfile = profInfo.getDefaultProfile("zosmf");
       youUseTheProfile(zosmfProfile);

       // Maybe you want the arg values for the default JCLCheck profile
       let jckProfile = profInfo.getDefaultProfile("jclcheck");
       let jckMergedArgs = profInfo.mergeArgsForProfile(jckProfile);
       let jckFinalArgs = youPromptForMissingArgsAndCombineWithKnownArgs(
           jckMergedArgs.knownArgs, jckMergedArgs.missingArgs
       );
       youRunJclCheck(jckFinalArgs);

       // Maybe no profile of type "zosmf" even exists.
       let zosmfProfiles = profInfo.getAllProfiles("zosmf");
       if (zosmfProfiles.length == 0) {
           // No zosmf profile exists
           // Merge any required arg values for the zosmf profile type
           let zosmfMergedArgs =
               profInfo.mergeArgsForProfileType("zosmf");

           // Values of secure arguments must be loaded separately. You can
           // freely log the contents of zosmfMergedArgs without leaking secure
           // argument values, until they are loaded with the lines below.
           zosmfMergedArgs.knownArgs.forEach((arg) => {
               if (arg.secure) arg.argValue = profInfo.loadSecureArg(arg);
           });

           let finalZosmfArgs =
               youPromptForMissingArgsAndCombineWithKnownArgs(
                   zosmfMergedArgs.knownArgs,
                   zosmfMergedArgs.missingArgs
               );
           youRunSomeZosmfCommand(finalZosmfArgs);
       }

       // So you want to write to a config file?
       // You must use the Config API to write to a team configuration.
       // See the Config class documentation for functions to set
       // and save team config arguments.

       // Let's save some zosmf arguments from the example above.
       let yourZosmfArgsToWrite: IProfArgAttrs =
           youSetValuesToOverwrite(
               zosmfMergedArgs.knownArgs, zosmfMergedArgs.missingArgs
           );

       let configObj: Config = profInfo.getTeamConfig();
       youWriteArgValuesUsingConfigObj(
           configObj, yourZosmfArgsToWrite
       );

### Hierarchy

- ProfileInfo

## Index

### Constructors

- constructor

### Properties

- mAppName
- mCredentials
- mExtendersJson
- mHasValidSchema
- mImpLogger
- mLoadedConfig
- mOverrideWithEnv
- mProfileSchemaCache

### Accessors

- hasValidSchema
- onlyV1ProfilesExist
- onlyV1ProfilesExist

### Methods

- addProfileToConfig
- addProfileTypeToSchema
- addToGlobalSchema
- argDataType
- argTeamConfigLoc
- buildSchema
- ensureReadFromDisk
- findTeamOsLocation
- getAllProfiles
- getDefaultProfile
- getOsLocInfo
- getProfileTypes
- getSchemaForType
- getTeamConfig
- getTeamSubProfiles
- hasTokenExpiredForProfile
- isDefaultTeamProfile
- isSecured
- loadAllSchemas
- loadSchema
- loadSecureArg
- mergeArgsForProfile
- mergeArgsForProfileType
- omitCmdPropsFromSchema
- overrideWithEnv
- profileManagerWillLoad
- readProfilesFromDisk
- removeKnownProperty
- secureFieldsWithDetails
- updateKnownProperty
- updateProperty
- updateSchemaAtLayer
- createSession
- getZoweDir
- initSessCfg
- profAttrsToProfLoaded
- readExtendersJsonFromDisk
- writeExtendersJson

## Constructors

### constructor

- new ProfileInfo(appName: string, profInfoOpts?: IProfOpts): ProfileInfo

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:155

  Constructor for ProfileInfo class.

  #### Parameters

  - ##### appName: string

           The name of the application (like "zowe" in zowe.config.json)
           whose configuration you want to access.

  - ##### Optional profInfoOpts: IProfOpts

           Options that will control the behavior of ProfileInfo.

  #### Returns ProfileInfo

## Properties

### Private mAppName

mAppName: string = null

- Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:142

### Private mCredentials

mCredentials: ProfileCredentials

- Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:153

### Private mExtendersJson

mExtendersJson: IExtendersJsonOpts

- Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:155

### Private mHasValidSchema

mHasValidSchema: boolean = false

- Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:146

### Private mImpLogger

mImpLogger: Logger = null

- Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:143

### Private mLoadedConfig

mLoadedConfig: Config = null

- Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:141

### Private mOverrideWithEnv

mOverrideWithEnv: boolean = false

- Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:144

### Private mProfileSchemaCache

mProfileSchemaCache: Map<string, IProfileSchema>

- Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:152

Cache of profile schema objects mapped by profile type and config path if applicable. Example of map keys:

- For team config: "/root/.zowe/zowe.config.json:zosmf"

## Accessors

### hasValidSchema

- get hasValidSchema(): boolean

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:918

  Returns whether a valid schema was found (works for v1 and v2 configs)

  #### Returns boolean

### onlyV1ProfilesExist

- get onlyV1ProfilesExist(): boolean

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:805

  Returns an indicator that the user has no team configuration, but we detected the existence of old-school V1 profiles. We will not work with the V1 profiles. This function can let you tell a user that they are incorrectly trying to use V1 profiles.

  #### Returns boolean

  True - Means there is NO team config AND we detected that a V1 profile exists. False otherwise.

### Static onlyV1ProfilesExist

- get onlyV1ProfilesExist(): boolean

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:792

  Returns an indicator that the user has no team configuration, but we detected the existence of old-school V1 profiles. We will not work with the V1 profiles. This function can let you tell a user that they are incorrectly trying to use V1 profiles.

  deprecated

    Use non-static method instead to detect V2 profiles

  #### Returns boolean

  `true` if a V1 profile exists, and `false` otherwise.

## Methods

### addProfileToConfig

- addProfileToConfig(profileType: string, layerPath?: string): boolean

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1117

  Adds a profile type to the loaded Zowe config. The profile type must first be added to the schema using `addProfileTypeToSchema`.

  #### Parameters

  - ##### profileType: string

    The profile type to add

  - ##### Optional layerPath: string

  #### Returns boolean

  `true` if added to the loaded config; `false` otherwise

### addProfileTypeToSchema

- addProfileTypeToSchema(profileType: string, typeInfo: IExtenderTypeInfo, updateProjectSchema?: boolean): IAddProfTypeResult

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1295

  Adds a profile type to the schema, and tracks its contribution in extenders.json.

  NOTE: `readProfilesFromDisk` must be called at least once before adding new profile types.

  #### Parameters

  - ##### profileType: string

    The new profile type to add to the schema

  - ##### typeInfo: IExtenderTypeInfo

    Type metadata for the profile type (schema, source app., optional version)

  - ##### Optional updateProjectSchema: boolean

  #### Returns IAddProfTypeResult

  the result of adding the profile type to the schema

### Private addToGlobalSchema

- addToGlobalSchema(profileType: string, typeInfo: IExtenderTypeInfo): IAddProfTypeResult

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1198

  #### Parameters

  - ##### profileType: string

  - ##### typeInfo: IExtenderTypeInfo

  #### Returns IAddProfTypeResult

### Private argDataType

- argDataType(propType: string | string[]): "string" | "number" | "boolean" | "array" | "object"

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1613

  Get arg data type from a "typeof" string. Arg data types can be basic types like string, number, and boolean. If they are any other type or a union of types, their type will be represented simply as object.

  #### Parameters

  - ##### propType: string | string[]

    The type of a profile property

  #### Returns "string" | "number" | "boolean" | "array" | "object"

### Private argTeamConfigLoc

- argTeamConfigLoc(opts: IArgTeamConfigLoc): [IProfLoc, boolean]

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1630

  Given a profile name and property name, compute the profile location object containing OS and JSON locations.

  #### Parameters

  - ##### opts: IArgTeamConfigLoc

    Set of options that allow this method to get the profile location

  #### Returns [IProfLoc, boolean]

### buildSchema

- buildSchema(sources?: string[], layer?: IConfigLayer): IConfigSchema

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1349

  Builds the entire schema based on the available profile types and application sources.

  #### Parameters

  - ##### Optional sources: string[]

  - ##### Optional layer: IConfigLayer

  #### Returns IConfigSchema

  A config schema containing all applicable profile types

### Private ensureReadFromDisk

- ensureReadFromDisk(): void

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1031

  Ensures that ProfileInfo.readProfilesFromDisk() is called before an operation that requires that information.

  #### Returns void

### Private findTeamOsLocation

- findTeamOsLocation(jsonPath: string, excludeHomeDir?: boolean): string[]

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1595

  #### Parameters

  - ##### jsonPath: string

    The long form JSON path of the profile we are searching for.

  - ##### Optional excludeHomeDir: boolean

    The long form JSON path of the profile we are searching for.

  #### Returns string[]

  A string array containing the location of all files containing the specified team profile

### getAllProfiles

- getAllProfiles(profileType?: string, options?: IGetAllProfilesOptions): IProfAttrs[]

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:375

  Get all of the typed profiles in the configuration.

  #### Parameters

  - ##### Optional profileType: string

           Limit selection to only profiles of the specified type.
           If not supplied, the names of all typed profiles are returned.

  - ##### Optional options: IGetAllProfilesOptions

  #### Returns IProfAttrs[]

  An array of profile attribute objects. In addition to the name, you get the profile type, an indicator of whether the profile is the default profile for that type, and the location of that profile.

           If no profile exists for the specified type (or if
           no profiles of any kind exist), we return an empty array
           ie, length is zero.

### getDefaultProfile

- getDefaultProfile(profileType: string): IProfAttrs | null

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:422

  Get the default profile for the specified profile type.

  #### Parameters

  - ##### profileType: string

           The type of profile of interest.

  #### Returns IProfAttrs | null

  The default profile. If no profile exists for the specified type, we return null;

### getOsLocInfo

- getOsLocInfo(profile: IProfAttrs): IProfLocOsLoc[]

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:926

  Gather information about the paths in osLoc

  #### Parameters

  - ##### profile: IProfAttrs

    Profile attributes gathered from getAllProfiles

  #### Returns IProfLocOsLoc[]

### getProfileTypes

- getProfileTypes(sources?: string[]): string[]

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1390

  #### Parameters

  - ##### Optional sources: string[]

  #### Returns string[]

  a list of all available profile types

### getSchemaForType

- getSchemaForType(profileType: string): IProfileSchema

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1431

  Returns the schema object belonging to the specified profile type.

  #### Parameters

  - ##### profileType: string

    The profile type to retrieve the schema from

  #### Returns IProfileSchema

  The schema object provided by the specified profile type

### getTeamConfig

- getTeamConfig(): Config

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:478

  Get the Config object used to manipulate the team configuration on disk.

  Our current market direction is to encourage customers to edit the team configuration files in their favorite text editor.

  If you must ignore this recommended practice, you must use the Config class to manipulate the team config files. This class has a more detailed and therefore more complicated API, but it does contain functions to write data to the team configuration files.

  You must call ProfileInfo.readProfilesFromDisk() before calling this function.

  #### Returns Config

  An instance of the Config class that can be used to manipulate the team configuration on disk.

### Private getTeamSubProfiles

- getTeamSubProfiles(path: string, jsonPath: string, profObj: {}, profileType?: string): IProfAttrs[]

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1531

  Get all of the subprofiles in the configuration.

  #### Parameters

  - ##### path: string

             The short form profile name dotted path

  - ##### jsonPath: string

             The long form profile dotted path

  - ##### profObj: {}

             The profiles object from the parent profile.
             Contains the subprofiles to search through.

    - ##### [key: string]: any

  - ##### Optional profileType: string

             Limit selection to only profiles of the specified type.
             If not supplied, the names of all typed profiles are returned.

  #### Returns IProfAttrs[]

  An array of profile attribute objects. In addition to the name, you get the profile type, an indicator of whether the profile is the default profile for that type, and the location of that profile.

           If no profile exists for the specified type (or if
           no profiles of any kind exist), we return an empty array
           ie, length is zero.

### hasTokenExpiredForProfile

- hasTokenExpiredForProfile(profile: string | IProfileLoaded): boolean

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:194

  Checks if a JSON web token is used for authenticating the given profile name. If so, it will decode the token to determine whether it has expired.

  #### Parameters

  - ##### profile: string | IProfileLoaded

        The name of the profile or the profile object to check the JSON web
        token for

  #### Returns boolean

      Whether the token has expired for the given profile. Returns `false`
      if a token value is not set or the token type is LTPA2.

### Private isDefaultTeamProfile

- isDefaultTeamProfile(path: string, profileType?: string): boolean

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1570

  #### Parameters

  - ##### path: string

                 The short form profile name dotted path

  - ##### Optional profileType: string

                 Limit selection to profiles of the specified type

  #### Returns boolean

  A boolean true if the profile is a default profile, and a boolean false if the profile is not a default profile

### isSecured

- isSecured(): boolean

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:488

  Helper function to identify if the existing config is secure or not

  #### Returns boolean

  true if the teamConfig is storing credentials securely, false otherwise

### Private loadAllSchemas

- loadAllSchemas(): void

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1045

  Load any profile schema objects found on disk and cache them. For team config, we check each config layer and load its schema JSON if there is one associated.

  #### Returns void

### Private loadSchema

- loadSchema(profile: IProfAttrs): IProfileSchema | null

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1678

  Load the cached schema object for a profile type. Returns null if schema is not found in the cache.

  #### Parameters

  - ##### profile: IProfAttrs

    Profile attributes object

  #### Returns IProfileSchema | null

### loadSecureArg

- loadSecureArg(arg: IProfArgAttrs): any

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:949

  Load value of secure argument from the vault.

  #### Parameters

  - ##### arg: IProfArgAttrs

    Secure argument object

  #### Returns any

### mergeArgsForProfile

- mergeArgsForProfile(profile: IProfAttrs, mergeOpts?: IProfMergeArgOpts): IProfMergedArg

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:560

  Merge all of the available values for arguments defined for the specified profile. Values are retrieved from the following sources. Each successive source will override the previous source.

  - A default value for the argument that is defined in the profile definition.
  - A value defined in the base profile.
  - A value defined in the specified service profile.
  - For a team configuration, both the base profile values and the service profile values will be overridden with values from a zowe.config.user.json file (if it exists).
  - An environment variable for that argument (if environment overrides are enabled).

  #### Parameters

  - ##### profile: IProfAttrs

           The profile whose arguments are to be merged.

  - ##### Default value mergeOpts: IProfMergeArgOpts = { getSecureVals: false }

           Options to use when merging arguments.
           This parameter is not required. Defaults will be used.

  #### Returns IProfMergedArg

  An object that contains an array of known profile argument values and an array of required profile arguments which have no value assigned. Either of the two arrays could be of zero length, depending on the user's configuration and environment.

           We will return null if the profile does not exist
           in the current Zowe configuration.

### mergeArgsForProfileType

- mergeArgsForProfileType(profileType: string, mergeOpts?: IProfMergeArgOpts): IProfMergedArg

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:758

  Merge all of the available values for arguments defined for the specified profile type. See mergeArgsForProfile() for details about the merging algorithm. The intended use is when no profile of a specific type exists. The consumer app can prompt for values for missing arguments and then perform the desired operation.

  #### Parameters

  - ##### profileType: string

           The type of profile of interest.

  - ##### Default value mergeOpts: IProfMergeArgOpts = { getSecureVals: false }

           Options to use when merging arguments.
           This parameter is not required. Defaults will be used.

  #### Returns IProfMergedArg

  The complete set of required properties;

### Private omitCmdPropsFromSchema

- omitCmdPropsFromSchema(obj: Record<string, any>): Record<string, IProfileProperty>

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1187

  This helper function removes all command-related properties from the given schema properties object and returns it. This is so we can easily compare schemas from disk with those that are registered with type ICommandProfileSchema. It's also been added to avoid a breaking change (as we currently allow ICommandProfileSchema objects to be registered).

  #### Parameters

  - ##### obj: Record<string, any>

    The properties object from the schema

  #### Returns Record<string, IProfileProperty>

  The properties object, but with all of the command-related properties removed

### Private overrideWithEnv

- overrideWithEnv(mergedArgs: IProfMergedArg, profSchema?: IProfileSchema): void

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1716

  Override values in a merged argument object with values found in environment variables. The choice to override environment variables is controlled by an option on the ProfileInfo constructor.

  #### Parameters

  - ##### mergedArgs: IProfMergedArg

         On input, this must be an object containing merged arguments
         obtained from configuration settings. This function will override
         values in mergedArgs.knownArgs with values found in environment
         variables. It will also move arguments from mergedArgs.missingArgs
         into mergedArgs.knownArgs if a value is found in an environment
         variable for any missingArgs.

  - ##### Optional profSchema: IProfileSchema

  #### Returns void

### profileManagerWillLoad

- profileManagerWillLoad(): Promise<boolean>

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:901

  Checks whether the credential manager will load successfully.

  #### Returns Promise<boolean>

      True if it loaded successfully, or there is no credential manager
      configured in Imperative settings.json

### readProfilesFromDisk

- readProfilesFromDisk(teamCfgOpts?: IConfigOpts): Promise<void>

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:875

  Read the team configuration files (if any exist).

  #### Parameters

  - ##### Optional teamCfgOpts: IConfigOpts

           The optional choices related to reading a team configuration.

  #### Returns Promise<void>

### removeKnownProperty

- removeKnownProperty(options: IProfInfoRemoveKnownPropOpts): Promise<boolean>

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:346

  Remove a known property from the ProfileInfo class This method will call the updateKnownProperty method with a value set to `undefined` and serves as a helper function to make is easier to understand when a known property is removed.

  example

    The example below describes how to remove a property

            // Using the removeKnownProperty method
            profileInfo.removeKnownProperty({mergedArgs, property: "someProperty"});
            // Using the updateKnownProperty method
            profileInfo.updateKnownProperty({mergedArgs, property: "someProperty", value: undefined, isSecure: false});

  #### Parameters

  - ##### options: IProfInfoRemoveKnownPropOpts

    Set of options required to remove a known property

  #### Returns Promise<boolean>

  Returns a boolean indicating if the property has been removed

### secureFieldsWithDetails

- secureFieldsWithDetails(opts?: { global: boolean; user: boolean }): IProfArgAttrs[]

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1456

  List of secure properties with more details, like value, location, and type

  #### Parameters

  - ##### Optional opts: { global: boolean; user: boolean }

    The user and global flags that specify one of the four config files (aka layers).

    - ##### global: boolean

    - ##### user: boolean

  #### Returns IProfArgAttrs[]

  Array of secure property details

### updateKnownProperty

- updateKnownProperty(options: IProfInfoUpdateKnownPropOpts): Promise<boolean>

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:281

  Update a given property with the value provided. This function only works for properties that can be found in the config files (including secure arrays). If the property cannot be found, this function will resolve to false

  #### Parameters

  - ##### options: IProfInfoUpdateKnownPropOpts

    Set of options required to update a known property

  #### Returns Promise<boolean>

### updateProperty

- updateProperty(options: IProfInfoUpdatePropOpts): Promise<void>

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:219

  Update a given property in the config file.

  #### Parameters

  - ##### options: IProfInfoUpdatePropOpts

    Set of options needed to update a given property

  #### Returns Promise<void>

### Private updateSchemaAtLayer

- updateSchemaAtLayer(profileType: string, schema: IProfileSchema, layer: IConfigLayer, versionChanged?: boolean): boolean

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1148

  Updates the schema of the provided config layer to contain the new profile type.

  #### Parameters

  - ##### profileType: string

    The profile type to add into the schema

  - ##### schema: IProfileSchema

  - ##### layer: IConfigLayer

    The config layer that matches the schema to update

  - ##### Optional versionChanged: boolean

  #### Returns boolean

  `true` if added to the schema; `false` otherwise

### Static createSession

- createSession(profArgs: IProfArgAttrs[], connOpts?: IOptionsForAddConnProps): Session

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:510

  Create a session from profile arguments that have been retrieved from ProfileInfo functions.

  #### Parameters

  - ##### profArgs: IProfArgAttrs[]

         An array of profile arguments.

  - ##### Default value connOpts: IOptionsForAddConnProps = {}

         Options that alter our actions. See IOptionsForAddConnProps.
         The connOpts parameter need not be supplied.
         Default properties may be added to any supplied connOpts.
         The only option values used by this function are:
             connOpts.requestToken
             connOpts.defaultTokenType

  #### Returns Session

  A session that can be used to connect to a remote host.

### Static getZoweDir

- getZoweDir(): string

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:780

  Retrieves the Zowe CLI home directory. In the situation Imperative has not initialized it we use a default value.

  deprecated

    Use ConfigUtils.getZoweDir()

  #### Returns string

  - Returns the Zowe home directory

### Static initSessCfg

- initSessCfg(profArgs: IProfArgAttrs[], argNames?: string[]): ISession

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:993

  Initialize a session configuration object with the arguments from profArgs

  #### Parameters

  - ##### profArgs: IProfArgAttrs[]

         An array of profile argument attributes.

  - ##### Optional argNames: string[]

         An array of argument names to load from the profile. Defaults to
         all arguments that have an associated ISession property.

  #### Returns ISession

  A session containing all of the supplied profile argument attributes that are relevant to a session.

### Static profAttrsToProfLoaded

- profAttrsToProfLoaded(profAttrs: IProfAttrs, dfltProfLoadedVals?: any): IProfileLoaded

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:840

  Convert an IProfAttrs object into an IProfileLoaded objects This is a convenience function. IProfileLoaded was frequently passed among functions. This conversion function allows existing code to acquire values in the IProfAttrs structure but pass those values around in the older IProfileLoaded structure. The IProfAttrs properties will be copied as follows:

       IProfileLoaded.name    <-- IProfAttrs.profName
       IProfileLoaded.type    <-- IProfAttrs.profType
       IProfileLoaded.profile <-- profAttrs

  #### Parameters

  - ##### profAttrs: IProfAttrs

         A profile attributes object.

  - ##### Optional dfltProfLoadedVals: any

         A JSON object containing additional names from IProfileLoaded for
         which a value should be supplied. IProfileLoaded contains more
         properties than IProfAttrs. The items in this object will be
         placed into the resulting IProfileLoaded object.
         We use type "any" because all of the required properties of
         IProfileLoaded will not be supplied by dfltProfLoadedVals.
         If dfltProfLoadedVals is not supplied, only the following minimal
         set if hard-coded properties will be added to the IProfileLoaded object.

         IProfileLoaded.message      <-- "" (an empty string)
         IProfileLoaded.failNotFound <-- false

  #### Returns IProfileLoaded

  An IProfileLoaded object;

### Static readExtendersJsonFromDisk

- readExtendersJsonFromDisk(): IExtendersJsonOpts

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1093

  Reads the `extenders.json` file from the CLI home directory. Called once in `readProfilesFromDisk` and cached to minimize I/O operations.

  internal
  deprecated

    Please use `ConfigUtils.readExtendersJson` instead

  #### Returns IExtendersJsonOpts

### Static writeExtendersJson

- writeExtendersJson(obj: IExtendersJsonOpts): boolean

- - Defined in @zowe/imperative/src/config/src/ProfileInfo.ts:1103

  Attempts to write to the `extenders.json` file in the CLI home directory.

  internal
  deprecated

    Please use `ConfigUtils.writeExtendersJson` instead

  #### Parameters

  - ##### obj: IExtendersJsonOpts

  #### Returns boolean

  `true` if written successfully; `false` otherwise

Generated using TypeDoc