1. Go to this page and download the library: Download ralphjsmit/filesystem 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/ */
ralphjsmit / filesystem example snippets
use RalphJSmit\Filesystem\Stub;
$stub = Stub::new();
$file = Stub::dir(__DIR__)->getFile('/tmp/testFileA.php')->copy('/tmp/test');
// $file is now in __DIR__ . '/tmp/testFileA.php' AND in __DIR__ . '/tmp/test/testFileA.php'
Stub::dir(__DIR__)->getFile('/tmp/testFileA.php')->delete();
// returns true on success
$newContents = 'Hello world!';
$file = Stub::dir(__DIR__)->getFile('/tmp/testFileA.php')->putFile($newContents, '/tmp/test/myFile.php');
// Will create a file with the "Hello world!" in __DIR__ . '/tmp/test/myFile.php`
// Old file will still exist
$file = Stub::dir(__DIR)->getFile('/tmp/test/MyClass.php');
$file->replaceNamespace('App\Models');
// $file will now have the namespace App\Models
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.