Options
All
  • Public
  • Public/Protected
  • All
Menu

@nextcloud/paths

Index

Functions

basename

  • basename(path: string): string
  • Returns the base name of the given path. For example for "/abc/somefile.txt" it will return "somefile.txt"

    Parameters

    • path: string

    Returns string

dirname

  • dirname(path: string): string
  • Returns the dir name of the given path. For example for "/abc/somefile.txt" it will return "/abc"

    Parameters

    • path: string

    Returns string

encodePath

  • encodePath(path: string): string
  • URI-Encodes a file path but keep the path slashes.

    Parameters

    • path: string

    Returns string

isSamePath

  • isSamePath(path1: string, path2: string): boolean
  • Returns whether the given paths are the same, without leading, trailing or doubled slashes and also removing the dot sections.

    Parameters

    • path1: string
    • path2: string

    Returns boolean

joinPaths

  • joinPaths(...args: string[]): string
  • Join path sections

    Parameters

    • Rest ...args: string[]

    Returns string

Generated using TypeDoc