sinavia / php-library-native

原生文件系统处理。当速度至关重要时

v1.5.0 2020-08-01 08:47 UTC

This package is auto-updated.

Last update: 2024-08-29 04:31:44 UTC


README

使用操作系统的原生功能来提升速度

背景

安装

使用composer

composer require sinevia/php-library-native

用法

echo \Sinevia\Native::userHome();

方法

按字母顺序排列

  • commandExists($command) {

  • directoryClean($directoryPath)

  • directoryCreate($directoryPath)

  • directoryCopyRecursive($sourceDirectoryPath, $destinationDirectoryPath, $force = false)

  • directoryMergeRecursive($sourceDirectoryPath, $destinationDirectoryPath)

  • directoryDeleteRecursive($directoryPath)

  • exec($command)

    • 结果在 $lastExecOut
  • fileCopy($srcFilePath, $targetFilePath)

  • fileDelete($filePath)

  • fileReplaceText($filePath, $string, $replacement)

  • fileReplaceTextRegex($filePath, $regex, $replacement)

  • isLinux() {

  • isOsx()

  • isWindows()

  • userHome()