TQ\Vcs\Repository\AbstractRepository::resolveLocalPath PHP Method

resolveLocalPath() public method

Resolves an absolute path into a path relative to the repository path
public resolveLocalPath ( string | array $path ) : string | array
$path string | array A file system path (or an array of paths)
return string | array Either a single path or an array of paths is returned
    public function resolveLocalPath($path)
    {
        if (is_array($path)) {
            $paths = array();
            foreach ($path as $p) {
                $paths[] = $this->resolveLocalPath($p);
            }
            return $paths;
        } else {
            $path = FileSystem::normalizeDirectorySeparator($path);
            if (strpos($path, $this->getRepositoryPath()) === 0) {
                $path = substr($path, strlen($this->getRepositoryPath()));
            }
            return ltrim($path, '/');
        }
    }