getGslothConfigWritePath
getGslothConfigWritePath(
filename,identityProfileRaw?):string
Defined in: packages/core/src/utils/fileUtils.ts:59
Gets the path where gsloth should write configuration files based on .gsloth directory existence. The main difference from getGslothConfigReadPath is that this getGslothConfigWritePath method creates internal settings directory if it does not exist.
If .gsloth dir exists returns projectdir/.gsloth/.gsloth-settings
If .gsloth dir does not exist returns projectdir
When identityProfileRaw names a profile, the path is always
projectdir/.gsloth/.gsloth-settings/<profile>, creating .gsloth and the profile dir as
needed — a named profile only exists under .gsloth-settings/, so there is no project-root
fallback for it. A blank/whitespace-only profile name counts as “no profile”.
Parameters
Section titled “Parameters”filename
Section titled “filename”string
The configuration filename
identityProfileRaw?
Section titled “identityProfileRaw?”string
Optional identity profile subdirectory name within .gsloth-settings
Returns
Section titled “Returns”string
The resolved path where the configuration file should be written