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


PHP AJXP_Utils::isBrowsableArchive方法代码示例

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


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

示例1: filterNodeName

 function filterNodeName($nodePath, $nodeName, $isLeaf, $lsOptions)
 {
     if (AJXP_Utils::isHidden($nodeName) && !$this->driverConf["SHOW_HIDDEN_FILES"]) {
         return false;
     }
     $nodeType = "d";
     if ($isLeaf) {
         if (AJXP_Utils::isBrowsableArchive($nodeName)) {
             $nodeType = "z";
         } else {
             $nodeType = "f";
         }
     }
     if (!$lsOptions[$nodeType]) {
         return false;
     }
     if ($nodeType == "d") {
         if (RecycleBinManager::recycleEnabled() && $nodePath . "/" . $nodeName == RecycleBinManager::getRecyclePath()) {
             return false;
         }
         return !$this->filterFolder($nodeName);
     } else {
         if ($nodeName == "." || $nodeName == "..") {
             return false;
         }
         if (RecycleBinManager::recycleEnabled() && $nodePath == RecycleBinManager::getRecyclePath() && $nodeName == RecycleBinManager::getCacheFileName()) {
             return false;
         }
         return !$this->filterFile($nodeName);
     }
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:31,代码来源:class.fsAccessDriver.php

示例2: filterNodeName

 public function filterNodeName($nodePath, $nodeName, &$isLeaf, $lsOptions)
 {
     $showHiddenFiles = $this->getFilteredOption("SHOW_HIDDEN_FILES", $this->repository->getId());
     $isLeaf = is_file($nodePath . "/" . $nodeName) || AJXP_Utils::isBrowsableArchive($nodeName);
     if (AJXP_Utils::isHidden($nodeName) && !$showHiddenFiles) {
         return false;
     }
     $nodeType = "d";
     if ($isLeaf) {
         if (AJXP_Utils::isBrowsableArchive($nodeName)) {
             $nodeType = "z";
         } else {
             $nodeType = "f";
         }
     }
     if (!$lsOptions[$nodeType]) {
         return false;
     }
     if ($nodeType == "d") {
         if (RecycleBinManager::recycleEnabled() && $nodePath . "/" . $nodeName == RecycleBinManager::getRecyclePath()) {
             return false;
         }
         return !$this->filterFolder($nodeName);
     } else {
         if ($nodeName == "." || $nodeName == "..") {
             return false;
         }
         if (RecycleBinManager::recycleEnabled() && $nodePath == RecycleBinManager::getRecyclePath() && $nodeName == RecycleBinManager::getCacheFileName()) {
             return false;
         }
         return !$this->filterFile($nodeName);
     }
 }
开发者ID:projectesIF,项目名称:Ateneu,代码行数:33,代码来源:class.AbstractAccessDriver.php

示例3: loadNodeInfo

 /**
  * @param AJXP_Node $ajxpNode
  * @param bool $parentNode
  * @param bool $details
  * @return void
  */
 public function loadNodeInfo(&$ajxpNode, $parentNode = false, $details = false)
 {
     $mess = ConfService::getMessages();
     $nodeName = basename($ajxpNode->getPath());
     $metaData = $ajxpNode->metadata;
     if (!isset($metaData["is_file"])) {
         $isLeaf = is_file($ajxpNode->getUrl()) || AJXP_Utils::isBrowsableArchive($nodeName);
         $metaData["is_file"] = $isLeaf ? "1" : "0";
     } else {
         $isLeaf = $metaData["is_file"] == "1" ? true : false;
     }
     $metaData["filename"] = $ajxpNode->getPath();
     if (RecycleBinManager::recycleEnabled() && $ajxpNode->getPath() == RecycleBinManager::getRelativeRecycle()) {
         $recycleIcon = $this->countFiles($ajxpNode->getUrl(), false, true) > 0 ? "trashcan_full.png" : "trashcan.png";
         $metaData["icon"] = $recycleIcon;
         $metaData["mimestring"] = $mess[122];
         $ajxpNode->setLabel($mess[122]);
         $metaData["ajxp_mime"] = "ajxp_recycle";
     } else {
         $mimeData = AJXP_Utils::mimeData($ajxpNode->getUrl(), !$isLeaf);
         $metaData["mimestring_id"] = $mimeData[0];
         //AJXP_Utils::mimetype($ajxpNode->getUrl(), "type", !$isLeaf);
         $metaData["icon"] = $mimeData[1];
         //AJXP_Utils::mimetype($nodeName, "image", !$isLeaf);
         if ($metaData["icon"] == "folder.png") {
             $metaData["openicon"] = "folder_open.png";
         }
         if (!$isLeaf) {
             $metaData["ajxp_mime"] = "ajxp_folder";
         }
     }
     //if ($lsOptions["l"]) {
     $metaData["file_group"] = @filegroup($ajxpNode->getUrl()) || "unknown";
     $metaData["file_owner"] = @fileowner($ajxpNode->getUrl()) || "unknown";
     $crtPath = $ajxpNode->getPath();
     $vRoots = $this->repository->listVirtualRoots();
     $metaData["ajxp_readonly"] = "false";
     if (!@$this->isWriteable($ajxpNode->getUrl())) {
         $metaData["ajxp_readonly"] = "true";
     }
     if (!empty($crtPath)) {
         if (isset($vRoots[ltrim($crtPath, "/")])) {
             $metaData["ajxp_readonly"] = $vRoots[ltrim($crtPath, "/")]["right"] == "r" ? "true" : "false";
         }
     } else {
         if (count($vRoots)) {
             $metaData["ajxp_readonly"] = "true";
         }
     }
     $fPerms = @fileperms($ajxpNode->getUrl());
     if ($fPerms !== false) {
         $fPerms = substr(decoct($fPerms), $isLeaf ? 2 : 1);
     } else {
         $fPerms = '0000';
     }
     $metaData["file_perms"] = $fPerms;
     $datemodif = $this->date_modif($ajxpNode->getUrl());
     $metaData["ajxp_modiftime"] = $datemodif ? $datemodif : "0";
     $metaData["ajxp_description"] = $metaData["ajxp_relativetime"] = $mess[4] . " " . AJXP_Utils::relativeDate($datemodif, $mess);
     $metaData["bytesize"] = 0;
     if ($isLeaf) {
         $metaData["bytesize"] = filesize($ajxpNode->getUrl());
     }
     $metaData["filesize"] = AJXP_Utils::roundSize($metaData["bytesize"]);
     if (AJXP_Utils::isBrowsableArchive($nodeName)) {
         $metaData["ajxp_mime"] = "ajxp_browsable_archive";
     }
     if ($details == "minimal") {
         $miniMeta = array("is_file" => $metaData["is_file"], "filename" => $metaData["filename"], "bytesize" => $metaData["bytesize"], "ajxp_modiftime" => $metaData["ajxp_modiftime"]);
         $ajxpNode->mergeMetadata($miniMeta);
     } else {
         $ajxpNode->mergeMetadata($metaData);
     }
 }
开发者ID:ad-m,项目名称:pydio-core,代码行数:80,代码来源:class.fsAccessDriver.php


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