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

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