sinevia/php-library-native

Native filesystem handling. When speed is of essence

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

This package is auto-updated.

Last update: 2024-11-29 05:26:58 UTC


README

Using the native functions of the operating system to boost speed

Background

Installation

Using composer

composer require sinevia/php-library-native

Usage

echo \Sinevia\Native::userHome();

Methods

In alphabetical order

  • commandExists($command) {

  • directoryClean($directoryPath)

  • directoryCreate($directoryPath)

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

  • directoryMergeRecursive($sourceDirectoryPath, $destinationDirectoryPath)

  • directoryDeleteRecursive($directoryPath)

  • exec($command)

    • result in $lastExecOut
  • fileCopy($srcFilePath, $targetFilePath)

  • fileDelete($filePath)

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

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

  • isLinux() {

  • isOsx()

  • isWindows()

  • userHome()