Options
All
  • Public
  • Public/Protected
  • All
Menu

Module utils/files

Index

Variables

absoluteServerDir: string = ...

Functions

  • ensureDirExists(dir: string): Promise<void>
  • Creates dir if it doesn't exist. Works for nested, non-existing dirs

    Parameters

    • dir: string

    Returns Promise<void>

  • getStaticDir(): string
  • Returns string

    Absolute path of the frontend files that shall be served statically

  • initFile(path: string, content?: string): Promise<void>
  • Creates a file and the containing folders if they don't exist

    Parameters

    • path: string

      path of the file

    • content: string = ""

      content that should be written to the file if it didn't exist

    Returns Promise<void>

  • splitlines(content: string): string[]
  • Splits string into line strings and removes the last one if empty

    Parameters

    • content: string

      String including LF or CRLF line endings

    Returns string[]

    lines as an array of strings

Generated using TypeDoc