Set bath to base dir of project source code(so it will be stripped in paths displaying on client)
@param $sourcesBasePath
@throws \Exception
504026
public function setSourcesBasePath($sourcesBasePath) {
		$sourcesBasePath = realpath($sourcesBasePath);
		if(!$sourcesBasePath) {
			throw new \Exception('Path "' . $sourcesBasePath . '" not found');
		}
		$this->sourcesBasePath = $sourcesBasePath;
	}
1012377
public function setCachePath(string $cachePath)
    {
        $this->cachePath = $cachePath;
        if (!is_dir($this->cachePath)) {
            FileHelper::createDirectory($this->cachePath, $this->dirMode, true);
        }
    }
1237955
public function setStoragePath($path) {
		$dir  = pathinfo($path, PATHINFO_DIRNAME);
		$name = pathinfo($path, PATHINFO_BASENAME);
		
		$dir = realpath($dir);
		
		if ($dir === false) {
			throw new Exceptions\MetadataError('Invalid path: "' . $path . '"');
		}
		
		$this->metadataPath = $dir . DIRECTORY_SEPARATOR . $name;
	}
515668
public function setRoot($dir)
    {
        if (!is_dir($dir)) {
            throw new Exception(sprintf('Not found directory: %s', $dir));
        }

        $this->root = $this->cleanPath($dir);
    }
568454
public function setBaseWorkspace(Workspace $baseWorkspace)
    {
        $oldBaseWorkspace = $this->baseWorkspace;
        if ($oldBaseWorkspace !== $baseWorkspace) {
            $this->baseWorkspace = $baseWorkspace;
            $this->emitBaseWorkspaceChanged($this, $oldBaseWorkspace, $baseWorkspace);
        }
    }
588320
public function setBinPath($binPath)
    {
        $binPath = rtrim($binPath, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
        if (!file_exists($binPath . 'phantomjs') && !file_exists($binPath . 'phantomjs.exe')) {
            throw new \Exception("Bin directory should contain phantomjs or phantomjs.exe file!");
        }
        $this->binPath = $binPath;
    }
173654
protected function setSourcePath($path)
    {
        if ($this->sourcePath === self::BASE_PATH) {
            $this->sourcePath = $path;
        } elseif ($this->sourcePath === self::EMPTY_PATH) {
            $this->sourcePath = null;
        }
    }
948014
public static function setBaseDir($path)
    {
        $path = realpath(rtrim($path, '/\\ '));
        if ($path === false) {
            throw new \InvalidArgumentException("cat`t get real path: seems like path does`t exists: $path");
        }

        return static::$baseDir = $path;
    }
682674
public function useFixtures($fixturePath)
    {
        if ($fixturePath) {
            $this->_fixturePath = FileFixture::normalizePath($fixturePath);
        } else {
            $this->disableFixtures();
        }
    }
938188
public function toRelative(\Coast\Path $base)
    {
        if (!$this->isAbsolute() || !$base->isAbsolute()) {
            throw new \Exception("Source path '{$this}' is not absolute or base path '{$base}' is not absolute");
        }
        
        $source = explode('/', (string) $base);
        $target = explode('/', $this->_name);

        $name = $target;
        foreach ($source as $i => $part) {
            if ($part == $target[$i]) {
                array_shift($name);
            } else {
                $name = array_pad($name, (count($name) + (count($source) - $i) - 1) * -1, '..');
                break;
            }
        }
        $name = implode('/', $name);

        $class = get_class($this);
        return new $class($name);
    }
1184246
public function setResourcePath($path)
    {
        $escapedPath = rtrim($path, '/');
        if (!file_exists($escapedPath)) {
            throw new Exception(sprintf(
                "The path '%s' to resources' folder does not exist!",
                $escapedPath
            ));
        }

        $this->resourcePath = $escapedPath;
    }
281391
public function setNamespaceFromPath(string $filePath, string $srcSubFolderName, string $projectRootNamespace): self
    {
        $pathForNamespace = substr(
            $filePath,
            \ts\strpos(
                $filePath,
                $srcSubFolderName
            )
            + \strlen($srcSubFolderName)
            + 1
        );
        $pathForNamespace = substr($pathForNamespace, 0, strrpos($pathForNamespace, '/'));
        $namespaceToSet   = $projectRootNamespace
                            . '\\' . implode(
                                '\\',
                                explode(
                                    '/',
                                    $pathForNamespace
                                )
                            );
        $contents         = \ts\file_get_contents($filePath);
        $contents         = preg_replace(
            '%namespace[^:]+?;%',
            "namespace $namespaceToSet;",
            $contents,
            1,
            $count
        );
        if ($count !== 1) {
            throw new DoctrineStaticMetaException(
                'Namespace replace count is ' . $count . ', should be 1 when updating file: ' . $filePath
            );
        }
        file_put_contents($filePath, $contents);

        return $this;
    }
1163707
public function setBasePath($path, $publicPath = true)
    {
        $this->basePath   = $path;
        $this->publicPath = $publicPath;
    }
1130345
public static void setBaseDirectory (@Nonnull final String sBaseDirectory)
  {
    ValueEnforcer.notNull (sBaseDirectory, "BaseDirectory");

    s_aRWLock.writeLocked ( () -> {
      s_sBaseDirectory = sBaseDirectory;
    });
  }
131440
protected function setMenu(SourceSet $sourceSet)
    {
        // Second loop to set the menu which was initialized during the first loop
        foreach ($sourceSet->updatedSources() as $source) {
            /** @var \Sculpin\Core\Source\FileSource $source */

            if ($source->isGenerated() || !$source->canBeFormatted()) {
                // Skip generated sources.
                // Only takes pages that can be formatted (AKA *.md)
                continue;
            }

            $source->data()->set('menu', $this->menu);
        }
    }
1061909
public void setSourcepath(Path sourcepath) {
        if (compileSourcepath == null) {
            compileSourcepath = sourcepath;
        } else {
            compileSourcepath.append(sourcepath);
        }
    }
1346781
public static function move($sourcePath, $destinationPath)
    {
        if (!self::exists($sourcePath)) {
            throw new FileNotFoundException('Cannot find source file: ' . $sourcePath);
        }
        return rename($sourcePath, $destinationPath);
    }