Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ISystemProperty

Contains system info.

Hierarchy

  • ISystemProperty

Index

Properties

Properties

error

error: object

Actual errors are located here.

Type declaration

file

file: object

File system methods.

Type declaration

  • cache: object

    File cache.

    • files: Array<FileObject>

      Array of actual files and reverse indices pointing from files to index

    • index: object

      Index pointing to files

  • filter: object

    Filters

    • isDir: Filter

      Check if argument is a folder (relative to system root directory).

    • isFile: Filter

      Check if argument is a file (relative to system root directory).

  • getFile: function
    • getFile(dir: string, file: string, cacheTtl: number, force: boolean): Promise<Buffer>
    • Get file contents relative to system root directory.

      Structure

      files = [
        {
          file: actual_file,
          rIndex: {
            dir: "dirA",
            file: "fileA"
          }
        },
        {
          file: actual_file_b,
          rIndex: {
            dir: "dirB",
            file: "fileB"
          }
        }
      ]
      index = {
        "dirA": {
          "FileA": file_entry_link_a
        },
        "dirB": {
          "FileB": file_entry_link_b
        }
      }

      Parameters

      • dir: string

        Directory, relative to system root.

      • file: string

        Filename.

      • cacheTtl: number
      • force: boolean

      Returns Promise<Buffer>

      Promise, containing string with file contents.

  • getYaml: function
    • getYaml(dir: string, file: string): Promise<string>
    • Get contents of yaml file relative to system root directory.

      Parameters

      • dir: string

        Directory, relative to system root.

      • file: string

        Filename.

      Returns Promise<string>

      Promise, containing string with file contents..

  • join: function
    • join(dir: string | Array<string>, file: string | Array<string>): Promise<string | Array<string>>
    • // TODO: Switch to proper function Joins two paths.

      Parameters

      • dir: string | Array<string>
      • file: string | Array<string>

      Returns Promise<string | Array<string>>

      Promise, containing string path.

  • list: function
    • list(dir: string, filter: Filter | null): Promise<Array<string>>
    • List the contents of the folder, relative to system root directory.

      Parameters

      • dir: string

        Folder relative to system root.

      • filter: Filter | null

        Filter function.

      Returns Promise<Array<string>>

      Promise, containing an array of filtered strings - files/folders relative to system root.

      Usage - List folders

      systemInstance.private.file.list("css", systemInstance.private.file.filter.isDir);
  • toAbsolute: function
    • toAbsolute(dir: string, file: string): Promise<string>
    • // TODO: Switch to proper function Converts a file path to absolute operating system path. Used for external libraries, that require absolute path.

      Parameters

      • dir: string

        Relative directory to the root directory..

      • file: string

        Folder/file name.

      Returns Promise<string>

      Promise, containing string relative path.

  • toRelative: function
    • toRelative(dir: string, file: string): Promise<string>
    • // TODO: Switch to proper function Converts absolute path to relative path.

      Parameters

      • dir: string
      • file: string

      Returns Promise<string>

      Promise, containing string relative path.

role

role: object

Contains roles.

Type declaration

  • [key: string]: string

    Subsystem.

subsystem

subsystem: object

Actual subsystems are located here.

Type declaration

Generated using TypeDoc