Adds to the list of paths

@param   string  $type  The type of path to add.
@param   mixed   $path  The directory or stream, or an array of either, to search.
@return  object
8467
public function setPath($type, $path)
	{
		if (!array_key_exists($type, $this->paths))
		{
			throw new \Exception(\App::get('language')->txt('Unknown asset path type of %s given.', $type));
		}

		$path = trim((string) $path);

		// Add separators as needed
		$path = DS . trim($path, DS);

		// Add to list of paths
		$this->paths[$type] = $path;

		return $this;
	}
215303
public  function addClassPath($path) {
        if(!is_array($path)) {
            $path = array($path);
        }
        foreach($path as $item) {
            $this->classPaths[] = $item;
        }
    }
503217
public function upload($path, $type = '', $option = [])
    {
        if (is_array($path)) {
            return $this->uploadByFile($path, $type, $option);
        } elseif (is_file($path)) {
            return $this->uploadByPath($path, $type, $option);
        } else {
            return $this->uploadByUrl($path, $type, $option);
        }
    }
1041462
public function path($type, $path = null)
    {
        $instance = sprintf('path.%s', $type);
        $base = $this->basePath;

        // Verificar se foi instanciado um path diferente
        if (array_key_exists($instance, $this->instances)) {
            $base = $this->instances[$instance];
        }

        // Verificar se foi implementado em config
        $key = sprintf('paths.%s', strtolower($type));
        $base = config($key, $base);

        // Verificar se deve colocar a base
        if (substr($base, 0, 2) == './') {
            $base = $this->basePath . DIRECTORY_SEPARATOR . substr($base, 2);
        }

        // Verificar se deve adiconar type no path
        if ($base == $this->basePath) {
            $path = is_null($path) ? $type : $type . DIRECTORY_SEPARATOR . $path;
        }

        // Retornar
        return is_null($path) ? $base : $base . DIRECTORY_SEPARATOR . $path;
    }
484296
public function addDependency($type, $path)
	{
		if (null === $this->dependencies)
			$this->dependencies = array();
		if (!isset($this->dependencies[$type]))
			$this->dependencies[$type] = array();
		
		if (!isset($this->dependencies[$type][$path]))
			//in order to not register the first file
			$this->dependencies[$type][$path] = true;
	}
1570
public function addPath($path)
    {
        if (empty($path) || false === ($real_path = realpath($path))) {
            throw new FileNotFoundException(null, 0, null, $path);
        }
        $this->paths[] = $real_path;

        return $this;
    }
1022615
public function importResource($type, $path) {
        $src = '/static/'.$path;
        $template = self::$resTemplate[$type];
        $result = str_replace('{url}', $src, $template);
        return $result;
	}
495154
protected function is($path, $type)
    {
        if (! $this->adapter->isAbsolute($path)) {
            $path = $this->rootPath . $path;
        }
        switch ($type) {
            case 'readable':
                return $this->adapter->isReadable($path);
            case 'writable':
                return $this->adapter->isWritable($path);
            case 'executable':
                return $this->adapter->isExecutable($path);
            case 'file':
                return $this->adapter->isFile($path);
            case 'dir':
                return $this->adapter->isDir($path);
            case 'any':
                return $this->adapter->fileExists($path);
            default:
                throw new FilesystemException("Unknown file type '{$type}'");
        }
    }
453176
public static function file($path, $type = null)
    {
        $response = new self(
            Status::OK,
            new PhpStream($path, 'rb')
        );
        if (isset($type)) {
            $response->setHeader('Content-Type', $type);
        }
        return $response;
    }
594158
public function addPath($path)
	{
		$path = rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
		$this->finder->addPath($path);

		if ($this->environment)
		{
			$this->finder->addPath($path.$this->environment);
		}

		return $this;
	}
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;
	}
866165
public function addAttachment($path, $type, $title = '')
    {
        array_push($this->attachments, array(
          'path' => $path,
          'type' => $type,
          'title' => $title,
        ));

        return $this;
    }
242667
public function addPath($path)
    {
        try {
            $this->twigFileLoader->addPath($path);
        } catch (\Twig_Error_Loader $e) {
            throw new InvalidPathException($e->getMessage());
        }
    }
1161956
public function addPath($path)
    {
        // convert from path string to array of directories
        if (is_string($path) && ! strpos($path, '://')) {
            // the path config is a string, and it's not a stream
            // identifier (the "://" piece). add it as a path string.
            $path = explode(PATH_SEPARATOR, $path);

            // typically in path strings, the first one is expected
            // to be searched first. however, SavantPHP uses a stack,
            // so the first would be last.  reverse the path string
            // so that it behaves as expected with path strings.
            $path = array_reverse($path);
        } else {
            // just force to array
            settype($path, 'array');
        }

        // loop through the path directories
        foreach ($path as $dir) {
            // no surrounding spaces allowed!
            $dir = trim($dir);
            // add trailing separators as needed
            if (strpos($dir, '://') && substr($dir, -1) != '/') {
                // stream
                $dir .= '/';
            } elseif (substr($dir, -1) != DIRECTORY_SEPARATOR) {
                // directory
                $dir .= DIRECTORY_SEPARATOR;
            }
            // add to the top of the search dirs
            array_unshift(
                $this->configList[self::TPL_PATH_LIST],
                $dir
            );
        }
    }
582718
public static function createInvalidLinkTypeReturned(string $path, string $type): self
    {
        return new self(
            sprintf(
                'The link normalizer callback needs to return a %s|null, "%s" given at path: "%s"',
                LinkInterface::class,
                $type,
                $path
            )
        );
    }
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);
        }
    }
1136859
public function addFile($path)
    {
        $config = $this->loadFile($path);
        if (is_array($config)) {
            $this->merge($config);
        }
        return $this;
    }