Add file or directory to Svn

@param  string            $path
@throws NotFoundException
330025
public function add($path)
    {
        if (!file_exists($this->cwd . '/' . $path)) {
            throw new NotFoundException(sprintf('Path %s not found', $this->cwd . '/' . $path));
        }

        $result = $this->status($path);

        foreach ($result as $fileInfo) {
            if ($fileInfo->getStatus() === Status::UNVERSIONED) {
                $this->svn->execute('add', array($fileInfo->getPathname()), $this->cwd);
            }
        }
    }
242799
public function addFile($path)
    {
        $paths = $this->getGlobbedPaths($path);
        foreach ($paths as $path) {
            $file = new File($path);
            $path = $file->getRealPath()
                ? $file->getRealPath()
                : $file->getPathname();

            $this[$path] = $file;
        }
    }
726679
public function setPath($path)
	{
		if ( ! $this->files->exists($path) ) {
			$result = $this->files->put($path, '{}');
			if ( $result === false ) {
				throw new NotWritableException("Could not write to $path.");
			}
		}

		if ( ! $this->files->isWritable($path) ) {
			throw new NotWritableException("$path is not writable.");
		}

		$this->path = $path;
	}
555259
public function add($path)
    {
        if (null === $this->wc) {
            throw new \RuntimeException('Working copy not initialized, have you tried checkout()?');
        }

        return $this->wc->add($path);
    }
286790
public function addRoutesFile(string $path)
    {
        $datas = yaml_parse_file($path);

        $this->addRoutes($this->parseRoutesFiles($datas));
    }
70129
public static function appendPath($path)
    {
        $path = str_replace('//', '/', rtrim($path, '/'));
        if (is_dir($path) && !in_array($path, self::$_paths)) {
            array_push(self::$_paths, $path);
        }
    }
145224
private function createFeatureDirectory($path)
    {
        mkdir($path, 0777, true);

        if ($this->logger) {
            $this->logger->directoryCreated($path, 'place your *.feature files here');
        }
    }
1365338
public function addIncludePath($path = '')
	{
		// Force path to array
		settype($path, 'array');

		// Loop through the path directories
		foreach ($path as $dir)
		{
			if (!empty($dir) && !in_array($dir, self::$paths))
			{
				array_unshift(self::$paths, \Hubzero\Filesystem\Util::normalizePath($dir));
			}
		}

		return self::$paths;
	}
498336
public function setPath(string $path)
    {
        $this->path = $path;
        
        // update path to templates and preload list of templates.
        $this->contentPath = $this->path . DIR_CONTENT_BASENAME;
        $this->templatesPath = $this->contentPath . DIR_TEMPLATES_BASENAME;
        
        $this->templates = File::listFilesRecursively($this->templatesPath, false, EXT_PART, EXT_PAGE);
    }
150343
public static function addViewPath( $path )
    {
        self::$_viewPaths = array_merge(
            Option::clean( self::$_viewPaths ),
            array($path)
        );

        self::$_twigLoader = new \Twig_Loader_Filesystem( self::$_viewPaths );
        self::$_twigEnvironment = new \Twig_Environment( self::$_twigLoader );
    }
504090
private function ensureDirectoryExists($path)
    {
        if (!isset($this->resources[$path])) {
            // Recursively initialize parent directories
            if ($path !== '/') {
                $this->ensureDirectoryExists(Path::getDirectory($path));
            }

            $this->resources[$path] = new GenericResource($path);
            $this->resources[$path]->attachTo($this);

            return;
        }
    }
787775
public function ls($path)
    {
        if (!$this->hasCheckout) {
            $this->checkout();
        }

        if ($path == '/') {
            $path = '';
        }

        if (false === file_exists($this->cwd . '/' . $path)) {
            throw new NotFoundException(sprintf('The path \'%s\' is not found in %s', $path, $this->cwd));
        }

        $finder = new Finder();
        $files = $finder->in($this->cwd . '/' . $path)->exclude(".git")->ignoreDotFiles(false)->depth('== 0');

        $filelist = array();
        $entries = array();
        foreach ($files as $file) {
            $log = $this->log(($path ? $path . '/' : '') . $file->getRelativePathname(), null, 1);

            $commit = reset($log);
            $kind = $file->isDir() ? VcsFileInfo::DIR : VcsFileInfo::FILE;
            $file = new VcsFileInfo($file->getFilename(), $this->getHead(), $kind);
            $file->setCommit($commit);

            $entries[] = $file;
        }

        return $entries;
    }
1372266
protected function createFileDir($path)
    {
        if (!file_exists($path)) {
            $this->createFileDir(dirname($path));
            mkdir($path, 0777);
        }
    }
1362012
private static function createIndexFilesToPreventDirectoryListing($path)
    {
        if (!self::isPathWithinTmpFolder($path)) {
            return;
        }
        $filesToCreate = array(
            $path . '/index.htm',
            $path . '/index.php'
        );
        foreach ($filesToCreate as $file) {
            @file_put_contents($file, 'Nothing to see here.');
        }
    }
32368
public static function mkdir(string $path)
    {
        if (!is_dir($path))
        {
            mkdir($path, self::$dir_mode, true);
        }
    }
332742
public function addExisting(Path $source)
    {
        $list = $source->listPaths();
        foreach ($list as $el) {
            $f = null;
            if ($this->project !== null) {
                $f = $this->project->resolveFile($el);
            } else {
                $f = new PhingFile($el);
            }

            if ($f->exists()) {
                $this->setDir($f);
            } else {
                $this->log(
                    "dropping " . $f->__toString() . " from path as it doesn't exist",
                    Project::MSG_VERBOSE
                );
            }
        }
    }
796236
function addPath($path, $prepend = false)
    {
        $this->write(tap($this->read(), function (&$config) use ($path, $prepend) {
            $method = $prepend ? 'prepend' : 'push';

            $config['paths'] = collect($config['paths'])->{$method}($path)->unique()->all();
        }));
    }