public function dir_opendir($path)
    {
        $container = $this->getContainerFromContext($path);

        $path = $this->stripScheme($path);

        if (!$container->hasNodeAt($path)) {
            trigger_error(sprintf('opendir(%s): failed to open dir: No such file or directory', $path), E_USER_WARNING);

            return false;
        }

        try {

            $dir = $container->directoryAt($path);

        } catch (NotDirectoryException $e) {
            trigger_error(sprintf('opendir(%s): failed to open dir: Not a directory', $path), E_USER_WARNING);

            return false;
        }

        $permissionHelper = $container->getPermissionHelper($dir);

        if (!$permissionHelper->isReadable()) {
            trigger_error(sprintf('opendir(%s): failed to open dir: Permission denied', $path), E_USER_WARNING);

            return false;
        }

        $this->currentlyOpenedDir = new DirectoryHandler();
        $this->currentlyOpenedDir->setDirectory($dir);

        return true;
    }