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


PHP FilesystemInterface::listFiles方法代碼示例

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


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

示例1: findAllBackupFiles

 /**
  * @return \Illuminate\Support\Collection
  */
 private function findAllBackupFiles()
 {
     $files = new Collection($this->filesystem->listFiles());
     $files = $this->filterOutGitignoreFile($files);
     $files = $this->sortFilesByCreationDate($files);
     return $files;
 }
開發者ID:ricoa,項目名稱:laravel.io,代碼行數:10,代碼來源:BackupCleaner.php

示例2: getList

 /**
  * Returns a list of Identifier strings
  * Unfortunately the list() method is reserved
  *
  * @return string[]
  */
 public function getList()
 {
     $identifiers = array();
     $fileList = $this->filesystem->listFiles($this->getPath());
     foreach ($fileList as $file) {
         $identifiers[] = $file['filename'];
     }
     return $identifiers;
 }
開發者ID:link0,項目名稱:profiler,代碼行數:15,代碼來源:FilesystemHandler.php

示例3:

 function it_can_remove_old_backups(FilesystemInterface $filesystem)
 {
     $files = [['path' => '.gitignore'], ['path' => 'foo.sql'], ['path' => 'foo1.sql'], ['path' => 'foo2.sql'], ['path' => 'foo3.sql'], ['path' => 'foo4.sql'], ['path' => 'foo5.sql'], ['path' => 'foo6.sql']];
     $filesystem->listFiles()->willReturn($files);
     $filesystem->getTimestamp('foo.sql')->willReturn(10000);
     $filesystem->getTimestamp('foo1.sql')->willReturn(500);
     $filesystem->getTimestamp('foo2.sql')->willReturn(10000);
     $filesystem->getTimestamp('foo3.sql')->willReturn(10000);
     $filesystem->getTimestamp('foo4.sql')->willReturn(100);
     $filesystem->getTimestamp('.gitignore')->willReturn(50);
     $filesystem->getTimestamp('foo5.sql')->willReturn(10000);
     $filesystem->getTimestamp('foo6.sql')->willReturn(10000);
     $filesystem->delete('foo1.sql')->shouldBeCalled();
     $filesystem->delete('foo4.sql')->shouldBeCalled();
     $this->removeOldBackups(5)->shouldReturn(['foo4.sql', 'foo1.sql']);
 }
開發者ID:ricoa,項目名稱:laravel.io,代碼行數:16,代碼來源:BackupCleanerSpec.php


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