cmd-sync-servers - v1.0.0
    Preparing search index...

    Function safeLocalTarget

    • The local path of target, safe to write: its parent's real path is inside the real local root (so no linked folder leads out of it), and is the very folder the path names, so no link, junction or Windows short name stands in for another folder. The target itself is not a symbolic link or junction. resolve is replaceable in tests.

      Parameters

      • localRoot: string
      • target: RemotePath
      • resolve: (file: string) => Promise<string> = realpath

      Returns Promise<string>