Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ConfigFile

Configuration file class, representing a single configuration file inside the configuration folder or one of its sub-folders.

Hierarchy

  • ConfigFile

Index

Constructors

constructor

  • Create a new configuration file.

    Parameters

    • filepath: string

      Path to the configuration file.

    • configFolder: string

      Configuration files folder.

    • Default value options: IConfigFileOptions = {}

      ConfigFile constructor options object.

    Returns ConfigFile

Properties

configFolder

configFolder: string

filepath

filepath: string

folderTags

folderTags: boolean

keyValSeparator

keyValSeparator: string

namespace

namespace: string

tagDefinitions

tagDefinitions: object

Type declaration

tagSeparator

tagSeparator: string

tags

tags: any

Accessors

filename

  • get filename(): string

numTags

  • get numTags(): number

score

  • get score(): number

Methods

getFolders

  • getFolders(): string[]
  • Get an array of folder names of the config file's path. Treat the config folder as the root folder such that only folders will be listed that are sub-folders of the root config folder.

    Returns string[]

    Array of folder names.

loadJson

  • loadJson(): object
  • Load the JSON object contained by the configuration file.

    Returns object

processFilepath

  • processFilepath(): void
  • Process the path and filename of the configuration file regarding to the contained tags.

    Returns void

toString

  • toString(): string