public function create_storage_folder($controlledlinkfoldername, $webdavclient) {
        $parsedwebdavurl = issuer_management::parse_endpoint_url('webdav', $this->issuer);
        $webdavprefix = $parsedwebdavurl['path'];
        // Checks whether folder exist and creates non-existent folders.
        $webdavclient->open();
        $isdir = $webdavclient->is_dir($webdavprefix . $controlledlinkfoldername);
        // Folder already exist, continue.
        if (!$isdir) {
            $responsecreateshare = $webdavclient->mkcol($webdavprefix . $controlledlinkfoldername);

            if ($responsecreateshare != 201) {
                $webdavclient->close();
                throw new request_exception(array('instance' => $this->repositoryname,
                    'errormessage' => get_string('contactadminwith', 'repository_nextcloud',
                    'The folder to store files in the user account could not be created.')));
            }
        }
        $webdavclient->close();
    }
public function create_storage_folder($controlledlinkfoldername, $webdavclient) {
        $parsedwebdavurl = issuer_management::parse_endpoint_url('webdav', $this->issuer);
        $webdavprefix = $parsedwebdavurl['path'];
        // Checks whether folder exist and creates non-existent folders.
        $webdavclient->open();
        $isdir = $webdavclient->is_dir($webdavprefix . $controlledlinkfoldername);
        // Folder already exist, continue.
        if (!$isdir) {
            $responsecreateshare = $webdavclient->mkcol($webdavprefix . $controlledlinkfoldername);

            if ($responsecreateshare != 201) {
                $webdavclient->close();
                throw new request_exception(array('instance' => $this->repositoryname,
                    'errormessage' => get_string('contactadminwith', 'repository_nextcloud',
                    'The folder to store files in the user account could not be created.')));
            }
        }
        $webdavclient->close();
    }
public function create_storage_folder ( $ controlledlinkfoldername , $ webdavclient ) { $ parsedwebdavurl = issuer_management :: parse_endpoint_url ( 'webdav' , $ this -> issuer ) ; $ webdavprefix = $ parsedwebdavurl [ 'path' ] ; // Checks whether folder exist and creates non-existent folders. $ webdavclient -> open ( ) ; $ isdir = $ webdavclient -> is_dir ( $ webdavprefix . $ controlledlinkfoldername ) ; // Folder already exist, continue. if ( ! $ isdir ) { $ responsecreateshare = $ webdavclient -> mkcol ( $ webdavprefix . $ controlledlinkfoldername ) ; if ( $ responsecreateshare != 201 ) { $ webdavclient -> close ( ) ; throw new request_exception ( array ( 'instance' => $ this -> repositoryname , 'errormessage' => get_string ( 'contactadminwith' , 'repository_nextcloud' , 'The folder to store files in the user account could not be created.' ) ) ) ; } } $ webdavclient -> close ( ) ; }
Creates a folder to store access controlled links.
@param string $controlledlinkfoldername
@param \webdav_client $webdavclient
@throws \coding_exception
@throws configuration_exception
@throws request_exception
Creates a folder to store access controlled links .