本文整理汇总了PHP中OC_Filesystem::clearMounts方法的典型用法代码示例。如果您正苦于以下问题:PHP OC_Filesystem::clearMounts方法的具体用法?PHP OC_Filesystem::clearMounts怎么用?PHP OC_Filesystem::clearMounts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OC_Filesystem
的用法示例。
在下文中一共展示了OC_Filesystem::clearMounts方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUp
public function setUp()
{
//set testing key
$_SESSION['enckey'] = md5(time());
//clear all proxies and hooks so we can do clean testing
OC_FileProxy::clearProxies();
OC_Hook::clear('OC_Filesystem');
//enable only the encryption hook
OC_FileProxy::register(new OC_FileProxy_Encryption());
//set up temporary storage
OC_Filesystem::clearMounts();
OC_Filesystem::mount('OC_Filestorage_Temporary', array(), '/');
//set up the users home folder in the temp storage
$rootView = new OC_FilesystemView('');
$rootView->mkdir('/' . OC_User::getUser());
$rootView->mkdir('/' . OC_User::getUser() . '/files');
}
示例2: setUp
public function setUp()
{
$this->oldConfig = OCP\Config::getAppValue('files_encryption', 'enable_encryption', 'true');
OCP\Config::setAppValue('files_encryption', 'enable_encryption', 'true');
$this->oldKey = isset($_SESSION['enckey']) ? $_SESSION['enckey'] : null;
//set testing key
$_SESSION['enckey'] = md5(time());
//clear all proxies and hooks so we can do clean testing
OC_FileProxy::clearProxies();
OC_Hook::clear('OC_Filesystem');
//enable only the encryption hook
OC_FileProxy::register(new OC_FileProxy_Encryption());
//set up temporary storage
OC_Filesystem::clearMounts();
OC_Filesystem::mount('OC_Filestorage_Temporary', array(), '/');
//set up the users home folder in the temp storage
$rootView = new OC_FilesystemView('');
$rootView->mkdir('/' . OC_User::getUser());
$rootView->mkdir('/' . OC_User::getUser() . '/files');
}
示例3: setUp
public function setUp()
{
//clear all proxies and hooks so we can do clean testing
OC_FileProxy::clearProxies();
OC_Hook::clear('OC_Filesystem');
//enable only the encryption hook if needed
if (OC_App::isEnabled('files_encryption')) {
OC_FileProxy::register(new OC_FileProxy_Encryption());
}
//set up temporary storage
OC_Filesystem::clearMounts();
OC_Filesystem::mount('OC_Filestorage_Temporary', array(), '/');
OC_User::clearBackends();
OC_User::useBackend(new OC_User_Dummy());
//login
OC_User::createUser('test', 'test');
$this->user = OC_User::getUser();
OC_User::setUserId('test');
//set up the users dir
$rootView = new OC_FilesystemView('');
$rootView->mkdir('/test');
$this->instance = new OC_Cache_File();
}
示例4: setUp
public function setUp()
{
OC_Filesystem::clearMounts();
}