Forked from DominicWatts/magento 2 file operations
Created
November 22, 2021 21:04
-
-
Save DomPixie/33239eea27666e600a5b5848f8de3d56 to your computer and use it in GitHub Desktop.
Magento 2 File Operations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\Magento\Framework\Filesystem\Io\File | |
public function __construct( | |
\Magento\Framework\Filesystem\Io\File $file | |
) { | |
$this->file = $file; | |
} | |
public function streamRead($length = 1024) | |
public function streamReadCsv($delimiter = ',', $enclosure = '"') | |
public function streamWrite($str) | |
public function streamWriteCsv(array $row, $delimiter = ',', $enclosure = '"') | |
public function mkdir($dir, $mode = 0777, $recursive = true) | |
public function rmdir($dir, $recursive = false) | |
public static function rmdirRecursive($dir, $recursive = true) | |
public function pwd() | |
public function cd($dir) | |
public function read($filename, $dest = null) | |
public function write($filename, $src, $mode = null) | |
public function fileExists($file, $onlyFile = true) | |
public function isWriteable($path) | |
public function getDestinationFolder($filePath) | |
public function createDestinationDir($path) | |
public function checkAndCreateFolder($folder, $mode = 0777) | |
public function rm($filename) | |
public function mv($src, $destination) | |
public function cp($src, $destination) | |
public function chmod($filename, $mode, $recursive = false) | |
public static function chmodRecursive($dir, $mode) | |
public function ls($grep = null) | |
public function dirname($file) | |
public function getDirectoriesList($path, $flag = GLOB_ONLYDIR) | |
public function getPathInfo($path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment