getConfigFile

View as MarkdownOpen in Claude

Return the absolute path of the loaded config file, or null when the loader was populated via loadFromObject(). Python-compat alias for getFilePath(); the two are functionally identical.

Returns

string | null — the file path, or null if config was loaded from an object.

Example

import { ConfigLoader } from '@signalwire/sdk';
const loader = new ConfigLoader('config.json');
console.log(loader.getConfigFile()); // absolute path
const inMemory = new ConfigLoader();
inMemory.loadFromObject({ server: { port: 3000 } });
console.log(inMemory.getConfigFile()); // null