1. Go to this page and download the library: Download strukt/fs library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
strukt / fs example snippets
Strukt\Fs::isDir(file) //Directory Exists
Strukt\Fs::isFile(file) //File Exists
Strukt\Fs::isPath(path) //Path Esists
Strukt\Fs::cat(file) //Dump File Contents
Strukt\Fs::touch(file) //Create File
Strukt\Fs::touchWrite(file, contents) //Create Write To File
Strukt\Fs::rename(from, to) //Rename File
Strukt\Fs::overwrite(file, contents) //Overwrite File Contents
Strukt\Fs::appendWrite(file, contents) //Append Contents To File
Strukt\Fs::rm(file) //Delete File
Strukt\Fs::rmdir(dir) //Recursively Delete
Strukt\Fs::mkdir(dir) //Recursively Create
Strukt\Fs::isWritable(file) //Check If File Is Writeable
Strukt\Fs::isReadable(file) //Check If File is Readable
Strukt\Fs::copyRecur(source,destination) //Copy recursively
Strukt\Fs::cpr(source,destination) //Alias for copyRecur
Strukt\Fs::listFilesRecur(path) //List directory files recursively
Strukt\Fs::lsr(path) //Alias for listFilesRecur
Strukt\Fs::tail(filepath, lines = 20) //read last line of file: default 20 lines
Strukt\Fs::isWindows()//Is OS Windows
Strukt\Fs::dirSep(path)//OS appropriate directory separator on path
Strukt\Fs::ds(path)//Alisas for dirSep
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.