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


PHP AJXP_Utils::processFileName方法代码示例

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


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

示例1: switchAction


//.........这里部分代码省略.........
                     $logMessages[] = "{$mess['34']} " . SystemTextEncoding::toUTF8($file) . " {$mess['44']}.";
                 }
                 $logMessage = join("\n", $logMessages);
             }
             AJXP_Logger::logAction("Delete", array("files" => $selection));
             $reloadContextNode = true;
             break;
             //------------------------------------
             //	RENOMMER / RENAME
             //------------------------------------
         //------------------------------------
         //	RENOMMER / RENAME
         //------------------------------------
         case "rename":
             $filename_new = $dir . "/" . $filename_new;
             $error = $this->SSHOperation->moveFile($this->makeName($file), $this->makeName($filename_new));
             if ($error != null) {
                 $errorMessage = $error;
                 break;
             }
             $logMessage = SystemTextEncoding::toUTF8($file) . " {$mess['41']} " . SystemTextEncoding::toUTF8($filename_new);
             $reloadContextNode = true;
             $pendingSelection = SystemTextEncoding::fromUTF8($filename_new);
             AJXP_Logger::logAction("Rename", array("original" => $file, "new" => $filename_new));
             break;
             //------------------------------------
             //	CREER UN REPERTOIRE / CREATE DIR
             //------------------------------------
         //------------------------------------
         //	CREER UN REPERTOIRE / CREATE DIR
         //------------------------------------
         case "mkdir":
             $messtmp = "";
             $dirname = AJXP_Utils::processFileName($dirname);
             $error = $this->SSHOperation->createRemoteDirectory($this->makeName($dir . "/" . $dirname));
             if (isset($error)) {
                 $errorMessage = $error;
                 break;
             }
             $pendingSelection = $dir . "/" . $dirname;
             $messtmp .= "{$mess['38']} " . SystemTextEncoding::toUTF8($dirname) . " {$mess['39']} ";
             if ($dir == "") {
                 $messtmp .= "/";
             } else {
                 $messtmp .= SystemTextEncoding::toUTF8($dir);
             }
             $logMessage = $messtmp;
             $reloadContextNode = true;
             AJXP_Logger::logAction("Create Dir", array("dir" => $dir . "/" . $dirname));
             break;
             //------------------------------------
             //	CREER UN FICHIER / CREATE FILE
             //------------------------------------
         //------------------------------------
         //	CREER UN FICHIER / CREATE FILE
         //------------------------------------
         case "mkfile":
             $messtmp = "";
             $filename = AJXP_Utils::processFileName($filename);
             $error = $this->SSHOperation->setRemoteContent($this->makeName($dir . "/" . $filename), "");
             if (isset($error)) {
                 $errorMessage = $error;
                 break;
             }
             $messtmp .= "{$mess['34']} " . SystemTextEncoding::toUTF8($filename) . " {$mess['39']} ";
             if ($dir == "") {
开发者ID:umbecr,项目名称:camilaframework,代码行数:67,代码来源:class.sshAccessDriver.php

示例2: rename

 function rename($filePath, $filename_new)
 {
     $nom_fic = basename($filePath);
     $mess = ConfService::getMessages();
     $filename_new = AJXP_Utils::processFileName($filename_new);
     $old = $this->urlBase . "/{$filePath}";
     if (!is_writable($old)) {
         throw new AJXP_Exception($mess[34] . " " . $nom_fic . " " . $mess[99]);
     }
     $new = dirname($old) . "/" . $filename_new;
     if ($filename_new == "") {
         throw new AJXP_Exception("{$mess['37']}");
     }
     if (file_exists($new)) {
         throw new AJXP_Exception("{$filename_new} {$mess['43']}");
     }
     if (!file_exists($old)) {
         throw new AJXP_Exception($mess[100] . " {$nom_fic}");
     }
     AJXP_Controller::applyHook("move.metadata", array($old, $new, false));
     rename($old, $new);
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:22,代码来源:class.fsAccessDriver.php


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