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


PHP vfsStream::enableDotfiles方法代码示例

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


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

示例1: provideSwitchWithExpectations

 /**
  * @return  array
  */
 public function provideSwitchWithExpectations()
 {
     return array(array(function () {
         vfsStream::disableDotfiles();
     }, array()), array(function () {
         vfsStream::enableDotfiles();
     }, array('.', '..')));
 }
开发者ID:mikey179,项目名称:vfsstream,代码行数:11,代码来源:vfsStreamContainerIteratorTestCase.php

示例2: recursiveDirectoryIterationWithDotsEnabled

 /**
  * @test
  * @group  issue_50
  */
 public function recursiveDirectoryIterationWithDotsEnabled()
 {
     vfsStream::enableDotfiles();
     vfsStream::setup();
     $structure = array('Core' => array('AbstractFactory' => array('test.php' => 'some text content', 'other.php' => 'Some more text content', 'Invalid.csv' => 'Something else'), 'AnEmptyFolder' => array(), 'badlocation.php' => 'some bad content'));
     $root = vfsStream::create($structure);
     $rootPath = vfsStream::url($root->getName());
     $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($rootPath), \RecursiveIteratorIterator::CHILD_FIRST);
     $pathes = array();
     foreach ($iterator as $fullFileName => $fileSPLObject) {
         $pathes[] = $fullFileName;
     }
     $this->assertEquals(array('vfs://root' . DIRECTORY_SEPARATOR . '.', 'vfs://root' . DIRECTORY_SEPARATOR . '..', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . '.', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . '..', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'AbstractFactory' . DIRECTORY_SEPARATOR . '.', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'AbstractFactory' . DIRECTORY_SEPARATOR . '..', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'AbstractFactory' . DIRECTORY_SEPARATOR . 'test.php', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'AbstractFactory' . DIRECTORY_SEPARATOR . 'other.php', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'AbstractFactory' . DIRECTORY_SEPARATOR . 'Invalid.csv', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'AbstractFactory', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'AnEmptyFolder' . DIRECTORY_SEPARATOR . '.', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'AnEmptyFolder' . DIRECTORY_SEPARATOR . '..', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'AnEmptyFolder', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'badlocation.php', 'vfs://root' . DIRECTORY_SEPARATOR . 'Core'), $pathes);
 }
开发者ID:kdambekalns,项目名称:vfsStream,代码行数:18,代码来源:DirectoryIterationTestCase.php


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