creates the resource, the container and the object by the path given

@param string $path
@return bool|RackspaceCloudFilesStreamWrapper
323488
public function initFromPath($path)
    { 
        $this->setPosition(0);
        $this->setDataBuffer(null);

        $resource = $this->getService()->createResourceFromPath($path);
        if (!$resource) {
            return false;
        }

        $this->setResource($resource);
        return $this;
    }
341040
public function createZipFile($path = null)
    {
        if ($path === null) {
            $path = tempnam(sys_get_temp_dir(), 'temp-zip-');
        }
        $zip = new \ZipArchive();
        $zip->open($path, \ZipArchive::CREATE);
        $this->addYmlFiles($zip);
        $zip->close();

        return $path;
    }
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;
    }
1017110
private function createReadmesInGeneratedClientRoot($path)
    {
        if ($this->pathIsGapic($path)) {
            $questionText = sprintf('%s ' . PHP_EOL . 'Create README.md?', $path);
            $q = $this->confirm($questionText);
            $create = $this->askQuestion($q);
            if ($create) {
                $file = $path .'/README.md';
                $content = file_get_contents($this->templatesPath .'/'. self::README_GEN_CLIENT_TPL);

                $content = str_replace('{notice}', file_get_contents(
                    $this->templatesPath .'/'. sprintf(self::GRPC_NOTICE_TPL, $this->info['type'])
                ), $content);
                $content = str_replace('{display}', $this->info['display'], $content);
                $content = str_replace('{version}', $this->getVersionFromPath($path), $content);

                file_put_contents($file, $content);
            }
            return;
        }

        $files = $this->scanDirectory($path);
        foreach ($files as $file) {
            $file = $path .'/'. $file;
            if (is_dir($file)) {
                $this->createReadmesInGeneratedClientRoot($file);
            }
        }
    }
820647
public function download(string $path)
	{
		// To get specific file data pass in the value you want e.g. /Name 
		$requestUrl = $this->siteUrl.'/sites/'.$this->siteName.'/_api/Web/GetFileByServerRelativeUrl(\''.$this->folderPath.$path.'\')';
		
		$options = [
			'headers' => $this->requestHeaders,
		];
		
		$response = $this->send('GET', $requestUrl, $options);
		
		return StreamWrapper::getResource($response->getBody());
	}
282346
public function getContainerFromContext($path)
    {
        $scheme = current(preg_split('#://#', $path));
        $options = stream_context_get_options(stream_context_get_default());

        return $options[$scheme]['Container'];
    }
278870
public function get(string $path): File {
		return (new File(Paths::appendPath($this->getUrl(), $path)))->addFilters($this->recursiveFilter, true);
	}
373116
private function createFilePath($path)
    {
        $dir = dirname($path);
        return file_exists($dir) || FileHelper::createDirectory($dir, 0775, true);
    }
85671
public static function create(string $path): self
    {
        if (!is_dir($path)) {
            if (is_writeable(dirname($path))) {
                if (mkdir($path)) {
                    return new static($path);
                }
                throw new FolderException('Creating folder ('.$path.') failed');
            }
            throw new FolderException('Cannot create folder, because the directory ('.dirname($path).') is not accessible',
                FolderException::NOT_WRITEABLE);
        }
        throw new FolderException('Cannot create folder, because the folder path ('.$path.') already exists', FolderException::ALREADY_EXIST);
    }
1367537
public function createFile($path)
    {
        $node = $this->at($path);
        if ($node !== null && $node->type == 'dir') {
            return false;
        }

        $node = $this->at(dirname($path));
        if (null === $node) {
            return false;
        }

        $this->at($path, (object) [
            'type' => 'file',
            'perms' => 0664,
            'content' => ''
        ]);
        return true;
    }
514683
public function rmdir($path)
    {
        $container = $this->getContainerFromContext($path);
        $path = $this->stripScheme($path);

        try {
            $directory = $container->nodeAt($path);

            if ($directory instanceof File) {
                trigger_error(
                    sprintf('Warning: rmdir(%s): Not a directory', $path),
                    E_USER_WARNING
                );

                return false;
            }

            $permissionHelper = $container->getPermissionHelper($directory);
            if (!$permissionHelper->isReadable()) {
                trigger_error(
                    sprintf('rmdir: %s: Permission denied', $path),
                    E_USER_WARNING
                );

                return false;
            }

        } catch (NotFoundException $e) {
            trigger_error(
                sprintf('Warning: rmdir(%s): No such file or directory', $path),
                E_USER_WARNING
            );

            return false;
        }

        if ($directory->size()) {
            trigger_error(
                sprintf('Warning: rmdir(%s): Directory not empty', $path),
                E_USER_WARNING
            );

            return false;
        }

        $container->remove($path, true);

        return true;
    }
1315086
protected function createImage($path)
    {
        $path = sprintf('%s/../Resources/images/%s', __DIR__, $path);
        $file = $this->container->get('enhavo_media.factory.file')->createFromPath($path);
        return $this->container->get('enhavo_media.media.media_manager')->saveFile($file);
    }
339691
private function createPathIfNeeded($path)
	{
		return  !(!\is_dir($path) && !@\mkdir($path, 0777 & (~$this->umask), true) && !\is_dir($path));
	}
529676
public function createDir($path)
    {
        $directory = $this->getPath($path);
        if (!is_dir($directory)) {
            if (file_exists($directory)) {
                throw new RuntimeException(
                    $directory . ' is not a directory.'
                );
            }

            if (!mkdir($directory, 0777, true)) {
                throw new RuntimeException(
                    $directory . ' can not be created.'
                );
            }
        }

        return true;
    }
1195986
public function createAutoload($path)
	{
		$loader = new Loaders\RobotLoader;
		$loader->setCacheStorage(new Caching\Storages\FileStorage($this->temp));
		$loader->addDirectory($path)->register();
		return $loader;
	}
797870
public static function createFromPath($path)
    {
        if (!file_exists($path)) {
            throw new Exception\FactoryException(sprintf('Unable to open file %s', $path));
        }
        $file = new \SplFileInfo($path);
        return static::createFromSplFileInfo($file);
    }
1204982
protected function createResource($path, $reference)
    {
        if (null === $reference) {
            $resource = new GenericResource();
        } elseif (isset($reference[0]) && '@' === $reference[0]) {
            $resource = new LinkResource(substr($reference, 1));
        } elseif (is_dir($reference)) {
            $resource = new DirectoryResource($reference);
        } elseif (is_file($reference)) {
            $resource = new FileResource($reference);
        } else {
            throw new RuntimeException(sprintf(
                'Trying to create a FilesystemResource on a non-existing file or directory "%s"',
                $reference
            ));
        }

        $resource->attachTo($this, $path);

        return $resource;
    }