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


PHP Files::copyDirectoryRecursively方法代码示例

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


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

示例1: postPackageUpdateAndInstall

 /**
  * Calls actions and install scripts provided by installed packages.
  *
  * @param \Composer\Script\PackageEvent $event
  * @return void
  * @throws Exception\UnexpectedOperationException
  */
 public static function postPackageUpdateAndInstall(PackageEvent $event)
 {
     $operation = $event->getOperation();
     if (!$operation instanceof \Composer\DependencyResolver\Operation\InstallOperation && !$operation instanceof \Composer\DependencyResolver\Operation\UpdateOperation) {
         throw new Exception\UnexpectedOperationException('Handling of operation with type "' . $operation->getJobType() . '" not supported', 1348750840);
     }
     $package = $operation->getJobType() === 'install' ? $operation->getPackage() : $operation->getTargetPackage();
     $packageExtraConfig = $package->getExtra();
     if (isset($packageExtraConfig['typo3/flow'])) {
         if (isset($packageExtraConfig['typo3/flow']['post-install']) && $operation->getJobType() === 'install') {
             self::runPackageScripts($packageExtraConfig['typo3/flow']['post-install']);
         } elseif (isset($packageExtraConfig['typo3/flow']['post-update']) && $operation->getJobType() === 'update') {
             self::runPackageScripts($packageExtraConfig['typo3/flow']['post-update']);
         }
         $installPath = $event->getComposer()->getInstallationManager()->getInstallPath($package);
         $relativeInstallPath = str_replace(getcwd() . '/', '', $installPath);
         if (isset($packageExtraConfig['typo3/flow']['manage-resources']) && $packageExtraConfig['typo3/flow']['manage-resources'] === TRUE) {
             if (is_dir($relativeInstallPath . '/Resources/Private/Installer/Distribution/Essentials')) {
                 Files::copyDirectoryRecursively($relativeInstallPath . '/Resources/Private/Installer/Distribution/Essentials', './', FALSE, TRUE);
             }
             if (is_dir($relativeInstallPath . '/Resources/Private/Installer/Distribution/Defaults')) {
                 Files::copyDirectoryRecursively($relativeInstallPath . '/Resources/Private/Installer/Distribution/Defaults', './', TRUE, TRUE);
             }
         }
     }
 }
开发者ID:animaltool,项目名称:webinterface,代码行数:33,代码来源:InstallerScripts.php

示例2: copyDistributionFiles

 /**
  * Copies any distribution files to their place if needed.
  *
  * @param string $installerResourcesDirectory Path to the installer directory that contains the Distribution/Essentials and/or Distribution/Defaults directories.
  * @return void
  */
 protected static function copyDistributionFiles($installerResourcesDirectory)
 {
     $essentialsPath = $installerResourcesDirectory . 'Distribution/Essentials';
     if (is_dir($essentialsPath)) {
         Files::copyDirectoryRecursively($essentialsPath, getcwd() . '/', false, true);
     }
     $defaultsPath = $installerResourcesDirectory . 'Distribution/Defaults';
     if (is_dir($defaultsPath)) {
         Files::copyDirectoryRecursively($defaultsPath, getcwd() . '/', true, true);
     }
 }
开发者ID:robertlemke,项目名称:flow-development-collection,代码行数:17,代码来源:InstallerScripts.php

示例3: createTemporaryConfigurationRootPath

 /**
  * @param string $configurationRootPath
  * @param array $additionalConfiguration
  * @return string
  */
 protected function createTemporaryConfigurationRootPath($configurationRootPath, array $additionalConfiguration)
 {
     if ($additionalConfiguration === array()) {
         return $configurationRootPath;
     }
     $buildPath = $this->generateTemporaryConfigurationRootPath($configurationRootPath);
     if (@is_dir($buildPath)) {
         Files::removeDirectoryRecursively($buildPath);
     }
     Files::copyDirectoryRecursively($configurationRootPath, $buildPath);
     $additionalConfigurationLines = implode(PHP_EOL, $additionalConfiguration);
     file_put_contents(rtrim($buildPath, '/') . '/conf.py', $additionalConfigurationLines, FILE_APPEND);
     return $buildPath;
 }
开发者ID:neos,项目名称:doctools,代码行数:19,代码来源:SphinxConfiguration.php

示例4: movePackage

 /**
  * Moves a package from one path to another.
  *
  * @param string $fromAbsolutePath
  * @param string $toAbsolutePath
  * @return void
  */
 protected function movePackage($fromAbsolutePath, $toAbsolutePath)
 {
     Files::createDirectoryRecursively($toAbsolutePath);
     Files::copyDirectoryRecursively($fromAbsolutePath, $toAbsolutePath, false, true);
     Files::removeDirectoryRecursively($fromAbsolutePath);
 }
开发者ID:cerlestes,项目名称:flow-development-collection,代码行数:13,代码来源:PackageManager.php

示例5: copyDirectoryRecursivelyKeepsExistingTargetFilesIfRequested

 /**
  * @test
  */
 public function copyDirectoryRecursivelyKeepsExistingTargetFilesIfRequested()
 {
     Files::createDirectoryRecursively('vfs://Foo/source/bar/baz');
     file_put_contents('vfs://Foo/source/bar/baz/file.txt', 'source content');
     Files::createDirectoryRecursively('vfs://Foo/target/bar/baz');
     file_put_contents('vfs://Foo/target/bar/baz/file.txt', 'target content');
     Files::copyDirectoryRecursively('vfs://Foo/source', 'vfs://Foo/target', true);
     $this->assertEquals('target content', file_get_contents('vfs://Foo/target/bar/baz/file.txt'));
 }
开发者ID:robertlemke,项目名称:flow-development-collection,代码行数:12,代码来源:FilesTest.php

示例6: movePackageToDeactivatedPackages

 /**
  * Moves a package from the regular package path to the inactive packages directory.
  *
  * @param string $packagePath absolute path to the package
  * @return void
  */
 protected function movePackageToDeactivatedPackages($packagePath)
 {
     Files::copyDirectoryRecursively($packagePath, $this->buildInactivePackagePath($packagePath), false, true);
     Files::removeDirectoryRecursively($packagePath);
 }
开发者ID:albe,项目名称:flow-development-collection,代码行数:11,代码来源:PackageManager.php


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