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


PHP Files::emptyDirectoryRecursively方法代码示例

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


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

示例1: flush

 /**
  * Removes all cache entries of this cache.
  *
  * @return void
  * @api
  */
 public function flush()
 {
     \TYPO3\Flow\Utility\Files::emptyDirectoryRecursively($this->cacheDirectory);
 }
开发者ID:kszyma,项目名称:flow-development-collection,代码行数:10,代码来源:SimpleFileBackend.php

示例2: compileProxies

 /**
  * Compiles the Doctrine proxy class code using the Doctrine ProxyFactory.
  *
  * @return void
  */
 public function compileProxies()
 {
     Files::emptyDirectoryRecursively(Files::concatenatePaths(array($this->environment->getPathToTemporaryDirectory(), 'Doctrine/Proxies')));
     $proxyFactory = $this->entityManager->getProxyFactory();
     $proxyFactory->generateProxyClasses($this->entityManager->getMetadataFactory()->getAllMetadata());
 }
开发者ID:patrickreck,项目名称:flow-development-collection,代码行数:11,代码来源:Service.php

示例3: emptyDirectoryRecursivelyThrowsExceptionIfSpecifiedPathDoesNotExist

 /**
  * @test
  * @expectedException \TYPO3\Flow\Utility\Exception
  */
 public function emptyDirectoryRecursivelyThrowsExceptionIfSpecifiedPathDoesNotExist()
 {
     Files::emptyDirectoryRecursively('NonExistingPath');
 }
开发者ID:robertlemke,项目名称:flow-development-collection,代码行数:8,代码来源:FilesTest.php

示例4: flush

 /**
  * Removes all cache entries of this cache and sets the frozen flag to FALSE.
  *
  * @return void
  * @api
  */
 public function flush()
 {
     Files::emptyDirectoryRecursively($this->cacheDirectory);
     if ($this->frozen === TRUE) {
         @unlink($this->cacheDirectory . 'FrozenCache.data');
         $this->frozen = FALSE;
     }
 }
开发者ID:sengkimlong,项目名称:Flow3-Authentification,代码行数:14,代码来源:FileBackend.php

示例5: forceFlushCachesIfNecessary

 /**
  * Does some emergency, forced, low level flush caches if the user told to do
  * so through the command line.
  *
  * @param Bootstrap $bootstrap
  * @return void
  */
 public static function forceFlushCachesIfNecessary(Bootstrap $bootstrap)
 {
     if (!isset($_SERVER['argv']) || !isset($_SERVER['argv'][1]) || !isset($_SERVER['argv'][2]) || !in_array($_SERVER['argv'][1], array('typo3.flow:cache:flush', 'flow:cache:flush')) || !in_array($_SERVER['argv'][2], array('--force', '-f'))) {
         return;
     }
     $bootstrap->getEarlyInstance('TYPO3\\Flow\\Cache\\CacheManager')->flushCaches();
     $environment = $bootstrap->getEarlyInstance('TYPO3\\Flow\\Utility\\Environment');
     \TYPO3\Flow\Utility\Files::emptyDirectoryRecursively($environment->getPathToTemporaryDirectory());
     echo 'Force-flushed caches for "' . $bootstrap->getContext() . '" context.' . PHP_EOL;
     exit(0);
 }
开发者ID:sokunthearith,项目名称:Intern-Project-Week-2,代码行数:18,代码来源:Scripts.php

示例6: forceFlushCachesIfNecessary

 /**
  * Does some emergency, forced, low level flush caches if the user told to do
  * so through the command line.
  *
  * @param Bootstrap $bootstrap
  * @return void
  */
 public static function forceFlushCachesIfNecessary(Bootstrap $bootstrap)
 {
     if (!isset($_SERVER['argv']) || !isset($_SERVER['argv'][1]) || !isset($_SERVER['argv'][2]) || !in_array($_SERVER['argv'][1], array('typo3.flow:cache:flush', 'flow:cache:flush')) || !in_array($_SERVER['argv'][2], array('--force', '-f'))) {
         return;
     }
     $bootstrap->getEarlyInstance(\TYPO3\Flow\Cache\CacheManager::class)->flushCaches();
     $environment = $bootstrap->getEarlyInstance(\TYPO3\Flow\Utility\Environment::class);
     \TYPO3\Flow\Utility\Files::emptyDirectoryRecursively($environment->getPathToTemporaryDirectory());
     echo 'Force-flushed caches for "' . $bootstrap->getContext() . '" context.' . PHP_EOL;
     // In production the site will be locked as this is a compiletime request so we need to take care to remove that lock again.
     if ($bootstrap->getContext()->isProduction()) {
         $bootstrap->getEarlyInstance(\TYPO3\Flow\Core\LockManager::class)->unlockSite();
     }
     exit(0);
 }
开发者ID:rderidder,项目名称:flow-development-collection,代码行数:22,代码来源:Scripts.php

示例7: flush

 /**
  * Removes all cache entries of this cache.
  *
  * @return void
  * @api
  */
 public function flush()
 {
     Files::emptyDirectoryRecursively($this->cacheDirectory);
 }
开发者ID:mkeitsch,项目名称:flow-development-collection,代码行数:10,代码来源:SimpleFileBackend.php


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