PHP code example of josantonius / file

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

    

josantonius / file example snippets


File::exists($file);

File::delete($file);

File::createDir($path);

File::copyDirRecursively($from, $to);

File::deleteEmptyDir($path);

File::deleteDirRecursively($path);

File::getFilesFromDir($path);



use Josantonius\File\File;



use Josantonius\File\File;

File::exists('path/to/file.php');

File::exists('https://raw.githubusercontent.com/Josantonius/PHP-File/master/composer.json');

File::delete(__DIR__ . '/test.txt');

File::createDir(__DIR__ . '/test/');

File::deleteEmptyDir(__DIR__ . '/test/');

File::deleteDirRecursively(__DIR__ . '/test/');

File::copyDirRecursively(__DIR__ . '/test/', __DIR__ . '/copy/');

get_class(File::getFilesFromDir(__DIR__));