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


PHP Storage::rename方法代码示例

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


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

示例1: rename_hook

 /**
  * rename/move versions of renamed/moved files
  * @param array $params array with oldpath and newpath
  *
  * This function is connected to the rename signal of OC_Filesystem and adjust the name and location
  * of the stored versions along the actual file
  */
 public static function rename_hook($params)
 {
     if (\OCP\App::isEnabled('files_versions')) {
         $oldpath = $params['oldpath'];
         $newpath = $params['newpath'];
         if ($oldpath != '' && $newpath != '') {
             Storage::rename($oldpath, $newpath);
         }
     }
 }
开发者ID:olucao,项目名称:owncloud-core,代码行数:17,代码来源:hooks.php

示例2: rename_hook

 /**
  * @brief rename/move versions of renamed/moved files
  * @param array with oldpath and newpath
  *
  * This function is connected to the rename signal of OC_Filesystem and adjust the name and location
  * of the stored versions along the actual file
  */
 public static function rename_hook($params)
 {
     if (\OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED) == 'true') {
         $oldpath = $params['oldpath'];
         $newpath = $params['newpath'];
         if ($oldpath != '' && $newpath != '') {
             Storage::rename($oldpath, $newpath);
         }
     }
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:17,代码来源:hooks.php

示例3: changeFilenames

 protected function changeFilenames()
 {
     //folder names
     \Storage::rename($this->packageDir . '/src/VanillaModel', $this->modelDir);
     \Storage::rename($this->modelDir . '/Resources/Views/pages', $this->modelDir . '/Resources/Views/' . $this->models);
     \Storage::rename($this->modelDir . '/Config/pages', $this->modelDir . '/Config/' . $this->models);
     //file names
     \Storage::rename($this->modelDir . '/Config/authorization/pages.php', $this->files['config.authorization']);
     \Storage::rename($this->modelDir . '/Config/validation/page.php', $this->files['config.validation']);
     \Storage::rename($this->modelDir . '/Database/Factories/PageFactory.php', $this->files['database.factory']);
     \Storage::rename($this->modelDir . '/Database/Seeds/PagesTableSeeder.php', $this->files['database.seeds']);
     \Storage::rename($this->modelDir . '/Database/Migrations/create_pages_table.php', $this->files['database.migration']);
     \Storage::rename($this->modelDir . '/Events/PageWasSaved.php', $this->files['events.saved']);
     \Storage::rename($this->modelDir . '/Http/Controllers/PagesController.php', $this->files['http.controller']);
     \Storage::rename($this->modelDir . '/Jobs/SaveNewPage.php', $this->files['jobs.save']);
     \Storage::rename($this->modelDir . '/Jobs/UpdateExistingPage.php', $this->files['jobs.update']);
     \Storage::rename($this->modelDir . '/Listeners/PageSavedListener.php', $this->files['listeners.saved']);
     \Storage::rename($this->modelDir . '/Models/Page.php', $this->files['model']);
     \Storage::rename($this->modelDir . '/Policies/PagePolicy.php', $this->files['policy']);
     \Storage::rename($this->modelDir . '/Providers/LarapressPagesServiceProvider.php', $this->files['provider']);
 }
开发者ID:larapress,项目名称:larapress,代码行数:21,代码来源:CreateModel.php


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