Skip to content

The Nuxed Filesystem component provides classes that interact with the local filesystem.

License

Notifications You must be signed in to change notification settings

nuxed/filesystem

Repository files navigation

Coding standards status Static analysis status Unit tests status Total Downloads Latest Stable Version License

Nuxed Filesystem

The Nuxed Filesystem component provides classes that interact with the local filesystem. Specialized classes can be used to read data, write data, alter permissions, rename files, copy, create, delete, move, traverse, and many more through an easy to use interface.

Installation

This package can be installed with Composer.

$ composer require nuxed/filesystem

Example

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
}

Security

For information on reporting security vulnerabilities in Nuxed, see SECURITY.md.


License

Nuxed is open-sourced software licensed under the MIT-licensed.