當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OC_Filesystem::loaded方法代碼示例

本文整理匯總了PHP中OC_Filesystem::loaded方法的典型用法代碼示例。如果您正苦於以下問題:PHP OC_Filesystem::loaded方法的具體用法?PHP OC_Filesystem::loaded怎麽用?PHP OC_Filesystem::loaded使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OC_Filesystem的用法示例。


在下文中一共展示了OC_Filesystem::loaded方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

 public static function init($root)
 {
     if (self::$defaultInstance) {
         return false;
     }
     self::$defaultInstance = new OC_FilesystemView($root);
     //load custom mount config
     if (is_file(OC::$SERVERROOT . '/config/mount.php')) {
         $mountConfig = (include OC::$SERVERROOT . '/config/mount.php');
         if (isset($mountConfig['global'])) {
             foreach ($mountConfig['global'] as $mountPoint => $options) {
                 self::mount($options['class'], $options['options'], $mountPoint);
             }
         }
         if (isset($mountConfig['group'])) {
             foreach ($mountConfig['group'] as $group => $mounts) {
                 if (OC_Group::inGroup(OC_User::getUser(), $group)) {
                     foreach ($mounts as $mountPoint => $options) {
                         $mountPoint = self::setUserVars($mountPoint);
                         foreach ($options as &$option) {
                             $option = self::setUserVars($option);
                         }
                         self::mount($options['class'], $options['options'], $mountPoint);
                     }
                 }
             }
         }
         if (isset($mountConfig['user'])) {
             foreach ($mountConfig['user'] as $user => $mounts) {
                 if ($user === 'all' or strtolower($user) === strtolower(OC_User::getUser())) {
                     foreach ($mounts as $mountPoint => $options) {
                         $mountPoint = self::setUserVars($mountPoint);
                         foreach ($options as &$option) {
                             $option = self::setUserVars($option);
                         }
                         self::mount($options['class'], $options['options'], $mountPoint);
                     }
                 }
             }
         }
         $mtime = filemtime(OC::$SERVERROOT . '/config/mount.php');
         $previousMTime = OC_Appconfig::getValue('files', 'mountconfigmtime', 0);
         if ($mtime > $previousMTime) {
             //mount config has changed, filecache needs to be updated
             OC_FileCache::triggerUpdate();
             OC_Appconfig::setValue('files', 'mountconfigmtime', $mtime);
         }
     }
     self::$loaded = true;
 }
開發者ID:noci2012,項目名稱:owncloud,代碼行數:50,代碼來源:filesystem.php

示例2: init

 public static function init($root)
 {
     if (self::$defaultInstance) {
         return false;
     }
     self::$defaultInstance = new OC_FilesystemView($root);
     //load custom mount config
     if (is_file(OC::$SERVERROOT . '/config/mount.php')) {
         $mountConfig = (include OC::$SERVERROOT . '/config/mount.php');
         if (isset($mountConfig['global'])) {
             foreach ($mountConfig['global'] as $mountPoint => $options) {
                 self::mount($options['class'], $options['options'], $mountPoint);
             }
         }
         if (isset($mountConfig['group'])) {
             foreach ($mountConfig['group'] as $group => $mounts) {
                 if (OC_Group::inGroup(OC_User::getUser(), $group)) {
                     foreach ($mounts as $mountPoint => $options) {
                         $mountPoint = self::setUserVars($mountPoint);
                         foreach ($options as &$option) {
                             $option = self::setUserVars($option);
                         }
                         self::mount($options['class'], $options['options'], $mountPoint);
                     }
                 }
             }
         }
         if (isset($mountConfig['user'])) {
             foreach ($mountConfig['user'] as $user => $mounts) {
                 if ($user === 'all' or strtolower($user) === strtolower(OC_User::getUser())) {
                     foreach ($mounts as $mountPoint => $options) {
                         $mountPoint = self::setUserVars($mountPoint);
                         foreach ($options as &$option) {
                             $option = self::setUserVars($option);
                         }
                         self::mount($options['class'], $options['options'], $mountPoint);
                     }
                 }
             }
         }
     }
     self::$loaded = true;
 }
開發者ID:noci2012,項目名稱:owncloud,代碼行數:43,代碼來源:filesystem.php

示例3: init

 public static function init($root, $user = '')
 {
     if (self::$defaultInstance) {
         return false;
     }
     self::$defaultInstance = new OC_FilesystemView($root);
     //load custom mount config
     if (!isset($user)) {
         $user = OC_User::getUser();
     }
     self::loadSystemMountPoints($user);
     self::$loaded = true;
 }
開發者ID:ryanshoover,項目名稱:core,代碼行數:13,代碼來源:filesystem.php


注:本文中的OC_Filesystem::loaded方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。