ini-loader.d.ts 927 B

123456789101112131415161718192021222324252627282930
  1. export interface LoadFileOptions {
  2. filename?: string,
  3. isConfig?: boolean,
  4. }
  5. export interface IniFileContent {
  6. [key: string]: {[key: string]: string}
  7. }
  8. /**
  9. * Ini file loader class the same as that used in the SDK. It loads and
  10. * parses config and credentials files in .ini format and cache the content
  11. * to assure files are only read once.
  12. * Note that calling operations on the instance instantiated from this class
  13. * won't affect the behavior of SDK since SDK uses an internal singleton of
  14. * this class.
  15. */
  16. export class IniLoader{
  17. /** Remove all cached files. Used after config files are updated. */
  18. clearCachedFiles():void;
  19. /**
  20. * Load configurations from config/credentials files and cache them
  21. * for later use. If no file is specified it will try to load default
  22. * files.
  23. * @returns {object} object of all profile information in the file
  24. */
  25. loadFrom(options: LoadFileOptions): IniFileContent;
  26. }