@param string $path

@return \Psr\Http\Message\ResponseInterface

@link https://dev.onedrive.com/items/list.htm
975457
public function listChildren($path)
    {
        $url = self::BASE_URI.$this->getFolderUrl($path).'children';

        return $this->getResponse('GET', $url);
    }
1226936
public function getMetadata($path)
    {
        $url = self::BASE_URI.$this->getPathUnderRootDrive($path);

        return $this->getResponse('GET', $url);
    }
903800
public function srcDir(string $path): self
    {
        $this->validatePathIsRelativeToProject($path, __METHOD__);
        $this->srcDir = rtrim($path, '/');

        return $this;
    }
922746
public function getList(string $path)
    {
        $entity = $this->getEntity($path);

        if (null !== $entity && $entity->file_exists() && $entity->is_dir()) {
            $files = [];
            $changes = $this->getChanges();
            $own = $changes->own($path);

            if (!($entity instanceof VirtualInterface)) {
                $directory = $this->getRoot();
                $directoryPath = $directory->path().'/'.$path;

                $dirHandler = opendir($directoryPath);
                if ($dirHandler) {
                    while (true) {
                        $file = readdir($dirHandler);
                        if (false === $file) {
                            break;
                        } elseif ('.' == $file || '..' == $file) {
                            continue;
                        }

                        $changesKey = ($path ? $path.'/' : '').$file;
                        if (isset($own[$changesKey])) {
                            continue;
                        }
                        $files[$changesKey] = Entity::newInstance($changesKey);
                    }
                    closedir($dirHandler);
                }
            }

            foreach ($own as $changesKey => $file) {
                /* @var $file EntityInterface */
                if ($file instanceof DeletedInterface) {
                    unset($own[$changesKey]);
                }
            }

            $mergedFiles = array_merge($files, $own);
            ksort($mergedFiles);

            $result = array_values($mergedFiles);
        } else {
            $result = null;
        }

        return $result;
    }
1351941
public function read($path)
    {
        $response = $this->readObject($path);

        if ($response !== false) {
            $response['contents'] = $response['contents']->getContents();
        }

        return $response;
    }
731693
public function create($path)
    {
        $call = 'fileops/create_folder';
        $params = array('root' => $this->root, 'path' => $this->normalisePath($path));
        $response = $this->fetch('POST', self::API_URL, $call, $params);
        return $response;
    }
1162952
protected function getApiResponseBody($path) {
    $request = $this->createRequest($path);

    $this->log('GET ' . $request->getUrl());
    $response = $request->send();
    return $response->getBody();
  }
308522
protected function getObject($path)
    {
        $location = $this->applyPathPrefix($path);

        return $this->container->getObject($location);
    }
1073731
private function openPath($path)
    {
        $url = (array) parse_url($path) + [
            'scheme' => '',
            'path' => '',
            'host' => ''
        ];
        $this->protocol = $url['scheme'];
        $this->file = ltrim($url['path'], '/');
        $client = self::getClient($this->protocol);
        $this->bucket = $client->bucket($url['host']);
        return $client;
    }
436253
protected function setPath($path)
    {
        if ($path instanceof StringList) {
            $this->path = $path;

            return $this;
        }

        if ($path === '') {
            $this->path->setPrefix('')->setSource([]);
            return $this;
        }

        $hasLeadingSlash = ($path[0] == '/');
        $hasTrailingSlash = (substr($path, -1) == '/');

        $path = is_array($path) ? $path : explode('/', trim($path, '/ '));

        $this->path->setSource($path);

        $prefix = $hasLeadingSlash || $this->scheme ? '/' : '';
        $suffix = $hasTrailingSlash ? '/' : '';

        $this->path->setPrefix($prefix);
        $this->path->setSuffix($suffix);

        return $this;
    }
712942
public function indexAction($path)
    {
        if (@is_dir($path)) {
            return $this->directoryAction($path);
        } else {
            return $this->fileAction($path);
        }
    }
1262549
public function media($path)
    {
        $call = 'media/' . $this->root . '/' . $this->encodePath($path);
        $response = $this->fetch('POST', self::API_URL, $call);
        return $response;
    }
273880
protected function getRoute($path)
    {
        if (isset($this->routes[$path])) {
            return $this->routes[$path];
        }

        if ($path == '/') {
            return $this->home_route;
        }

        return $path;
    }
163094
public function listDirectory($path = '')
    {
        $path = '/home/'.$this->userName.'/'.$path;
        $this->returnCode = 'no';
        $responseVesta = $this->send('v-list-fs-directory', $this->userName, $path);

        return $this->parseListing($responseVesta);
    }
1084112
public function getChildByPath($path)
    {
        if (!is_array($path)) {
            $path = trim($path, " /");
            $pieces = explode("/", $path);
        } else {
             $pieces = $path;
        }
            
        if (!sizeof($pieces)) return $this;

        if ($alias = array_shift($pieces)) {

                $c = $this->getChildByAlias($alias);
                if (sizeof($pieces)) {
                    return $c->getChildByPath($pieces);
                } else {
                    return $c;
                }

        }
        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']);
    }
210893
final public function getFileContents($path)
    {
        return $this->getRepositoryContent()->download(
            $this->settings->getVendor(),
            $this->settings->getPackage(),
            $path,
            $this->settings->getReference()
        );
    }