Download the PHP package sauvank/php-file-tools without Composer
On this page you can find all versions of the php package sauvank/php-file-tools. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package php-file-tools
Packagist Move files
A simple package for get files with extension and move.
Required
- PHP >=7.4
Run with docker (branch : docker)
./helper install
Run unit test
-
In folder app :
vendor/bin/phpunit tests
OR
./run_test.sh
-
Install with composer :
composer require sauvank/file-tools
List function
`
- $files, multidimensional array.
- each array need :
- string 'src', source of the file to move
- string 'output', output of the file
- optional :
- bool 'createOutputPath' default true, if the folder does not exist, create them.
- bool 'windowsNameValid' default true, modify the output path to be valid for windows.
- each array need :
`
- $files, multidimentionnal array
- each array need :
- string 'src', source of the file to move
- output 'src', output of the file
- optional :
- bool 'createOutputPath' default true, if the folder does not exist, create them.
- each array need :
Return array instance File in case of success or Exeption if error
`
- string $folderPath, path of the folder to get files
- array $extsToGet, array contain extention files to get. ex: ['mkv', 'mp4']
- array $excludeFolder, array contain folder name to exclude.
Return array instance File or Exeption if error
`
- string $folderPath, path of the folder to get files
- array $extsToGet, array contain extention files to get. ex: ['mkv', 'mp4']
- array $excludeFolder, array contain folder name to exclude.
Return array ultidimentional array with key equal folder and value equal file or Exeption if error
exemple return : [
["folder_path/folder 1"]=> [
0 => object(FileTools\File),
1 => object(FileTools\File),
2 => object(FileTools\File),
],
["folder_path/folder 2"]=> [
0 => object(FileTools\File),
1 => object(FileTools\File),
2 => object(FileTools\File),
],
]
Exemple :
move one files
`
move multiple files
exemple :
`
Class File function
`
`
`
`
`
All versions of php-file-tools with dependencies
PHP Build Version
Package Version
The package sauvank/php-file-tools contains the following files
Loading the files please wait ....