Skip to content

okapi-web/php-filesystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Path

License: MIT Twitter: @WalterWoshid PHP: >=8.0 Packagist Build

Coverage - PHP 8.0 Coverage - PHP 8.1 Coverage - PHP 8.2

PHP Filesystem is a PHP library that provides an abstraction layer for the filesystem.

Installation

composer require okapi/filesystem

Usage

<?php

use Okapi\Filesystem\Filesystem;

// Write file
Filesystem::writeFile('./path/to/file.txt', 'Hello World!');


// Read file
$contents = Filesystem::readFile('./path/to/file.txt');


// Remove directory or file
Filesystem::rm(
    './path',
    recursive: true,
    force: true,
);

// Create directory
Filesystem::mkdir(
    './path/to/directory',
    recursive: true,
    mode: 0777,
);

Testing

  • Run composer run-script test
    or
  • Run composer run-script test-coverage

Show your support

Give a ⭐ if this project helped you!

📝 License

Copyright © 2023 Valentin Wotschel.
This project is MIT licensed.

About

PHP Filesystem is a PHP library that provides an abstraction layer for the filesystem.

Topics

Resources

License

Stars

Watchers

Forks

Languages