PHP code example of nuxed / filesystem
1. Go to this page and download the library: Download nuxed/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/ */
nuxed / filesystem example snippets
hack
use namespace Nuxed\Filesystem;
<<__EntryPoint>>
async function main(): Awaitable<void> {
$file = new Filesystem\File('file.txt');
await $file->create(0755);
$file->write('Hello, World!');
print await $file->read(5); // Hello
$parent = $file->parent();
await $parent->flush();
$file->exists(); // false
}