PHP code example of vertilia / filesystem
1. Go to this page and download the library: Download vertilia/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/ */
vertilia / filesystem example snippets
print_r(Vertilia\Filesystem\Filesystem::normalizePath('//b/../a//b/c/./d//'));
// outputs: 'a/b/c/d'
try {
Vertilia\Filesystem\Filesystem::syncSymlinkDir(
'/shared/release/current',
'/local/release/current',
600,
60
);
} catch (RuntimeException $e) {
$logger->log($e->getMessage());
}