PHP code example of yalesov / file-system-manager

1. Go to this page and download the library: Download yalesov/file-system-manager 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/ */

    

yalesov / file-system-manager example snippets


use \Yalesov\FileSystemManager\FileSystemManager;
foreach (FileSystemManager::fileIterator('foo') as $file) {
  echo $file; // /path/to/file
}

use \Yalesov\FileSystemManager\FileSystemManager;
foreach (FileSystemManager::dirIterator('foo') as $dir) {
  echo $dir; // /path/to/child/dir
}

use \Yalesov\FileSystemManager\FileSystemManager;
FileSystemManager::rrmdir('foo');

use \Yalesov\FileSystemManager\FileSystemManager;
FileSystemManager::rcopy('foo', 'bar');

FileSystemManager::rcopy('foo', 'bar', 0777);

use \Yalesov\FileSystemManager\FileSystemManager;
FileSystemManager::rchmod('foo', 0755);

use \Yalesov\FileSystemManager\FileSystemManager;
FileSystemManager::rchown('foo', 'www-data');

use \Yalesov\FileSystemManager\FileSystemManager;
FileSystemManager::rchown('foo', 'www-data');