PHP code example of fyre / filesystem

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

    

fyre / filesystem example snippets


use Fyre\FileSystem\File;
use Fyre\FileSystem\Folder;

$file = new File($path, $create);

$accessTime = $file->accessTime();

$baseName = $file->baseName();

$file->chmod($permissions);

$file->close();

$contents = $file->contents();

$file->copy($destination, $overwrite);

$file->create();

$data = $file->csv($length, $separator, $enclosure, $escape);

$file->delete();

$dirName = $file->dirName();

$ended = $file->ended();

$exists = $file->exists();

$extension = $file->extension();

$fileName = $file->fileName();

$folder = $file->folder();

$group = $file->group();

$isExecutable = $file->isExecutable();

$isReadable = $file->isReadable();

$isWritable = $file->isWritable();

$lock = $file->lock($operation);

$mimeType = $file->mimeType();

$modifiedTime = $file->modifiedTime();

$open = $file->open($mode);

$owner = $file->owner();

$path = $file->path();

$permissions = $file->permissions();

$data = $file->read($length);

$file->rewind();

$file->seek($offset);

$size = $file->size();

$offset = $file->tell();

$file->touch($time, $accessTime);

$file->truncate($size);

$file->unlock();

$file->write($data);

$folder = new Folder($path, $create, $permissions);

$contents = $folder->contents();

$folder->copy($destination, $overwrite);

$folder->create($permissions);

$folder->delete();

$folder->empty();

$exists = $folder->exists();

$isEmpty = $folder->isEmpty();

$folder->move($destination, $overwrite);

$name = $folder->name();

$path = $folder->path();

$size = $folder->size();