当前位置: 首页>>代码示例>>PHP>>正文


PHP FileUtil::deldir方法代码示例

本文整理汇总了PHP中FileUtil::deldir方法的典型用法代码示例。如果您正苦于以下问题:PHP FileUtil::deldir方法的具体用法?PHP FileUtil::deldir怎么用?PHP FileUtil::deldir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileUtil的用法示例。


在下文中一共展示了FileUtil::deldir方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: removeLocalDir

 /**
  * Remove a directory from zikula's local cache directory.
  *
  * @param string $dir      The name of the directory to remove.
  * @param bool   $absolute Whether to process the passed dir as an absolute path or not.
  *
  * @return boolean true if successful, false otherwise.
  */
 public static function removeLocalDir($dir, $absolute = false)
 {
     $sm = ServiceUtil::getManager();
     $base = $sm['kernel.cache_dir'] . '/ztemp';
     $path = $base . '/' . $dir;
     return FileUtil::deldir($path, $absolute);
 }
开发者ID:rtznprmpftl,项目名称:Zikulacore,代码行数:15,代码来源:CacheUtil.php

示例2: actionDelTemplate

 public function actionDelTemplate($template)
 {
     $fileutil = new FileUtil();
     $fileutil->deldir("themes/" . $template);
     $defTheme = $this->connection->createCommand("select content from xm_config where syskey = 'theme'")->queryScalar();
     if ($defTheme == $template) {
         $templates = $fileutil->getFileList('themes');
         $this->actionSetDefault($templates[0]);
     }
     echo 1;
 }
开发者ID:Toney,项目名称:xmcms,代码行数:11,代码来源:TemplateController.php

示例3: removeLocalDir

 /**
  * Remove a directory from zikula's local cache directory.
  *
  * @param string $dir      The name of the directory to remove.
  * @param bool   $absolute Whether to process the passed dir as an absolute path or not.
  *
  * @return boolean true if successful, false otherwise.
  */
 public static function removeLocalDir($dir, $absolute = false)
 {
     $path = DataUtil::formatForOS(System::getVar('temp'), true) . '/' . $dir;
     return FileUtil::deldir($path, $absolute);
 }
开发者ID:projectesIF,项目名称:Sirius,代码行数:13,代码来源:CacheUtil.php

示例4: deletefiles

    /**
     * delete theme files from the file system if possible
     */
    public function deletefiles($args)
    {
        // check our input
        if (!isset($args['themename']) || empty($args['themename'])) {
            return LogUtil::registerArgsError();
        } else {
            $themename = $args['themename'];
        }

        if (!isset($args['themedirectory']) || empty($args['themedirectory'])) {
            return LogUtil::registerArgsError();
        } else {
            $osthemedirectory = DataUtil::formatForOS($args['themedirectory']);
        }

        // Security check
        if (!SecurityUtil::checkPermission('Theme::', $themename .'::', ACCESS_ADMIN)) {
            return LogUtil::registerPermissionError();
        }

        if (is_writable('themes') && is_writable('themes/' . $osthemedirectory)) {
            $res = FileUtil::deldir('themes/' .$osthemedirectory);
            if ($res == true) {
                return LogUtil::registerStatus(__('Done! Removed theme files from the file system.'));
            }

            return LogUtil::registerError(__('Error! Could not delete theme files from the file system. Please remove them by another means (FTP, SSH, ...).'));
        }

        LogUtil::registerStatus(__f('Notice: Theme files cannot be deleted because Zikula does not have write permissions for the themes folder and/or themes/%s folder.', DataUtil::formatForDisplay($args['themedirectory'])));

        return false;
    }
开发者ID:projectesIF,项目名称:Sirius,代码行数:36,代码来源:Admin.php


注:本文中的FileUtil::deldir方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。