@param string $path

@return Item
342349
public function setPath($path)
    {
        if ($path) {
            $this->not_cleared_path = $path;
            $this->doClearPath();
        } else {
            $this->path = '';
        }

        return $this;
    }
1276391
public function remove($path)
    {
        $keys       = $this->explode($path);
        $parameters = &$this->parameters;

        while (count($keys) > 0) {
            if (count($keys) === 1) {
                if (is_array($parameters)) {
                    unset($parameters[array_shift($keys)]);
                } else {
                    return $this;
                }
            } else {
                $key = array_shift($keys);

                if (!isset($parameters[$key])) {
                    return $this;
                }
                $parameters = &$parameters[$key];
            }
        }
        return $this;
    }
243609
public function isLast($path)
    {
        return $this->items && $path === array_keys($this->items)[\count($this->items) - 1];
    }
461896
public function replace($path)
    {
        //argument 1 must be a string
        Argument::i()->test(1, 'string');

        //get the path array
        $pathArray = $this->getArray();

        //pop out the last
        array_pop($pathArray);

        //push in the new
        $pathArray[] = $path;

        //assign back to path
        $this->data = implode('/', $pathArray);

        return $this;
    }
205786
public function loadImage(string $path): self
    {
        $this->image = new Image($this->secret, $path, null, $this->autorotate);
        return $this;
    }
1042301
private function convertPath($path)
    {
        if ($path === null) {
            return null;
        }

        return (new Path($path, $this->baseDir))->toString();
    }
744430
public function getFinder($path = '')
    {
        if (($protocol = array_search($this, self::$registeredWrappers))
            === false
        ) {
            $protocol = $this->registerStreamWrapper(null);
        }

        $path   = sprintf(
            "%s://%s/%s",
            $protocol,
            $this->getBucket(),
            $this->applyPathPrefix($path)
        );
        $finder = new Finder();
        $finder->in($path);

        return $finder;
    }
966121
public function get($path, $default = NULL)
    {
        $item = ArrayUtils::getValueOrNull($path, $this->container);

        return $item ? $item : $default;
    }
126111
protected function createDirectory($path)
    {
        if (!File::isDirectory($path)) {
            File::makeDirectory($path, 0777, true, true);
        }

        return $this;
    }
327041
public function getObject($path)
    {
        if ($path === '' || $path === '.') {
            return $this;
        }
        $data = $this->getObjectData($path);
        if ($data === false) {
            return false;
        }

        if ($data['type'] === 'blob') {
            return Blob::fromSha($data['sha'], $this->getUri(), $this->client);
        } elseif ($data['type'] === 'tree') {
            return Tree::fromSha($data['sha'], $this->getUri(), $this->client);
        }

        throw new \RuntimeException('Unrecognised object type: ' . $data['type']);
    }
389711
protected function getObjectInstance($path)
    {
        $location = $this->applyPathPrefix($path);

        $object = $this->container->getObject($location);

        return $object;
    }
444358
public static function get($path = false) {

        if ($path && self::isFolder($path)) {

            $list = array();

            $tmpList = scandir($path);

            foreach ($tmpList as $k => $item) {

                if ($item != '.' && $item != '..' && $item != '.DS_Store') {
                    $list[] = $item;
                }
            }

            return $list;
        }

        return false;
    }
617717
public function getFinder($path = '')
    {
        $finder = new Finder();
        $finder->in($this->applyPathPrefix($path));
        
        return $finder;
    }
1309347
public function get(string $path, $default = null)
    {
        $array = $this->items;

        if (!empty($path)) {
            $keys = $this->explode($path);
            foreach ($keys as $key) {
                if (!array_key_exists($key, $array)) {
                    return $default;
                }
                $array = $array[$key];
            }
        }

        return $array;
    }
1317913
public function path($path = null)
    {
        if (null === $path) {
            return $this->path;
        }
        $this->path = $path;

        return $this;
    }
544289
public function webDir(string $path): self
    {
        $this->validatePathIsRelativeToProject($path, __METHOD__);
        $this->webDir = rtrim($path, '/');

        return $this;
    }
173199
public function setPath($path)
    {
        if ($this->path) {
            $this->old_paths[] = $this->path;
        }
        $this->path = $path;

        return $this;
    }