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


PHP ResourceStorage::getFileList方法代码示例

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


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

示例1: fileListingsDoNotContainHiddenFilesWithDefaultFilters

 /**
  * Test if the default filters filter out hidden files (like .htaccess)
  *
  * @test
  */
 public function fileListingsDoNotContainHiddenFilesWithDefaultFilters()
 {
     // we cannot use fixture->createFile() because touch() does not work with vfsStream
     $this->addToMount(array('someFile' => '', '.someHiddenFile' => ''));
     $this->prepareFixture();
     $this->fixture->resetFileAndFolderNameFiltersToDefault();
     $fileList = $this->fixture->getFileList('/');
     $this->assertContains('someFile', array_keys($fileList));
     $this->assertNotContains('.someHiddenFile', array_keys($fileList));
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:15,代码来源:StorageTest.php

示例2: getFileListHandsOverRecursiveTRUEifSet

 /**
  * @test
  */
 public function getFileListHandsOverRecursiveTRUEifSet()
 {
     $this->prepareFixture(array());
     $driver = $this->createDriverMock(array('basePath' => $this->getMountRootUrl()), $this->fixture, array('getFileList'));
     $driver->expects($this->once())->method('getFileList')->with($this->anything(), $this->anything(), $this->anything(), $this->anything(), $this->anything(), TRUE)->will($this->returnValue(array()));
     $this->fixture->getFileList('/', 0, 0, TRUE, TRUE, TRUE);
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:10,代码来源:ResourceStorageTest.php

示例3: getFileListIgnoresCasingWhenSortingFilenames

 /**
  * @test
  */
 public function getFileListIgnoresCasingWhenSortingFilenames()
 {
     $fileList = array('aFile' => 'dfsdg', 'zFile' => 'werw', 'BFile' => 'asd', '12345' => 'fdsa', 'IMG_1234.jpg' => 'asdf');
     $this->prepareFixture(array());
     $driver = $this->createDriverMock(array(), $this->fixture, array('getFileList'));
     $driver->expects($this->once())->method('getFileList')->will($this->returnValue($fileList));
     $fileList = $this->fixture->getFileList('/');
     $this->assertEquals(array('12345', 'aFile', 'BFile', 'IMG_1234.jpg', 'zFile'), array_keys($fileList));
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:12,代码来源:StorageTest.php

示例4: getFileCount

 /**
  * Returns amount of all files within this folder, optionally filtered by
  * the given pattern
  *
  * @param array $filterMethods
  * @return integer
  */
 public function getFileCount(array $filterMethods = array())
 {
     // TODO replace by call to count()
     return count($this->storage->getFileList($this->identifier, 0, 0, $filterMethods));
 }
开发者ID:noxludo,项目名称:TYPO3v4-Core,代码行数:12,代码来源:Folder.php


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