Skip to main content



  • joinPaths(...paths: string[]): string

  • Joins paths together.

    For example:

    joinPaths(‘wordpress’, ‘wp-content’) ‘wordpress/wp-content’

    Use this for all PHP paths and do not use path.join(). This is important because Emscripten paths are always POSIX-style paths. Imagine joining paths on Windows:

    path.join(‘wordpress’, ‘wp-content’) ‘\wordpress\wp-content’ // invalid in PHP.wasm

    See the path.join issue for more details:


    • rest...paths: string[]

      Paths segments to join

    Returns string

    A joined path