本文整理汇总了PHP中OC_Filesystem::isDeletable方法的典型用法代码示例。如果您正苦于以下问题:PHP OC_Filesystem::isDeletable方法的具体用法?PHP OC_Filesystem::isDeletable怎么用?PHP OC_Filesystem::isDeletable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OC_Filesystem
的用法示例。
在下文中一共展示了OC_Filesystem::isDeletable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: min
$list->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '&dir=', false);
$list->assign('downloadURL', OCP\Util::linkTo('files', 'download.php') . '?file=', false);
$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
$breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
$breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '&dir=', false);
$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
$freeSpace = OC_Filesystem::free_space('/');
$freeSpace = max($freeSpace, 0);
$maxUploadFilesize = min($maxUploadFilesize, $freeSpace);
$permissions = OCP\Share::PERMISSION_READ;
if (OC_Filesystem::isUpdatable($dir . '/')) {
$permissions |= OCP\Share::PERMISSION_UPDATE;
}
if (OC_Filesystem::isDeletable($dir . '/')) {
$permissions |= OCP\Share::PERMISSION_DELETE;
}
if (OC_Filesystem::isSharable($dir . '/')) {
$permissions |= OCP\Share::PERMISSION_SHARE;
}
$tmpl = new OCP\Template('files', 'index', 'user');
$tmpl->assign('fileList', $list->fetchPage(), false);
$tmpl->assign('breadcrumb', $breadcrumbNav->fetchPage(), false);
$tmpl->assign('dir', OC_Filesystem::normalizePath($dir));
$tmpl->assign('isCreatable', OC_Filesystem::isCreatable($dir . '/'));
$tmpl->assign('permissions', $permissions);
$tmpl->assign('files', $files);
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
$tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));