nimayneb / flops
Fluent Local Phile system API
0.12.0
2019-10-23 13:02 UTC
Requires
- php: ^7.4.0
- ext-posix: *
- nimayneb/yawl: ^2.0.1
Requires (Dev)
- phpunit/phpunit: ^8.3.0
This package is auto-updated.
Last update: 2024-12-25 21:11:06 UTC
README
FLOPS is a API only for the Local File system with a fluent but verbosity (no abbreviations) interface support.
Key features:
- No dependencies (excepts POSIX extension)
- No regular expressions
- No use of SPL (Standard PHP Library)
- Proven and simplest patterns (see PHP documentation)
Use PHP internals for filesystem:
chgrp
chmod
clearstatcache
copy
disk_free_space
disk_total_space
fclose
feof
fgetc
fgets
file_exists
file_get_contents
file_put_contents
fileatime
filectime
filegroup
filemtime
fileowner
fileperms
filesize
fopen
fread
fseek
ftell
ftruncate
fwrite
is_dir
is_executable
is_file
is_link
is_readable
is_writable
mkdir
pathinfo
readlink
realpath
rename
rmdir
symlink
touch
unlink
Example of use:
use JayBeeR\Flops\LocalFileSystem;
$localBinaries = LocalFileSystem::get('/usr/local/bin/');
$composerFile = LocalFileSystem::get('composer.phar');
$composerBinary = $composerFile->copyTo($localBinaries)->omitExtension();
$composerBinary->setPermission(function(Permissions $permissions) {
$permissions->setExecutionAccessRightsForAll();
});
Table of contents
- Configuration
- File information
- Directory information
- Symbolic link information
- File resources
- File encoding
- File modes
- Permissions
- Root line
- Write content
- Exceptions
Wishlist
- Tests!
- more Documentations
- Exceptions give context help
- more Semantic Exceptions (and Refactoring)
- Execution process (STDIN, STDOUT, STDERR)