Options
All
  • Public
  • Public/Protected
  • All
Menu

Module storage/mapping/MapperUtil

Index

Functions

Const getAbsolutePath

  • getAbsolutePath(rootFilepath: string, path: string, identifier?: string): string
  • Get the absolute file path based on the rootFilepath of the store.

    Parameters

    • rootFilepath: string

      The root file path.

    • path: string

      The relative file path.

    • identifier: string = ''

      Optional identifier to add to the path.

    Returns string

    Absolute path of the file.

Const getRelativePath

  • Strips the baseRequestURI from the identifier and checks if the stripped base URI matches the store's one.

    throws

    NotFoundHttpError If the identifier does not match the baseRequestURI path of the store.

    Parameters

    • baseRequestURI: string

      Base URL for requests.

    • identifier: ResourceIdentifier

      Incoming identifier.

    • logger: Logger

      A logger instance.

    Returns string

    A string representing the relative path.

Const validateRelativePath