PHP code example of dnj / filesystem

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

    

dnj / filesystem example snippets



namespace YOUR_NAMESPACE\YOUR_FILESYSTEM;

use dnj\Filesystem\Directory as DirectoryAbstract;

class Directory extends DirectoryAbstract
{
    public function make(bool $recursively = true): void
    {
        ...
    }
    .
    .
    .
}

namespace YOUR_NAMESPACE\YOUR_FILESYSTEM;

use dnj\Filesystem\File as FileAbstract;

class Directory extends FileAbstract
{
    public function write(string $data): void
    {
        ...
    }
    public function read(int $length = 0): string
    {
        ...
    }
    .
    .
    .
}