PHP code example of krzysztofzylka / file

1. Go to this page and download the library: Download krzysztofzylka/file 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/ */

    

krzysztofzylka / file example snippets


\Krzysztofzylka\File\File::repairPath('path')

\Krzysztofzylka\File\File::mkdir('path', 0755)

\Krzysztofzylka\File\File::mkdir(['path', 'path2'])

\Krzysztofzylka\File\File::unlink('path')

\Krzysztofzylka\File\File::scanDir('directory path')

\Krzysztofzylka\File\File::touch('path', 'value') //value is not 

\Krzysztofzylka\File\File::copy('source path', 'destination path')

\Krzysztofzylka\File\File::copyDirectory('source path', 'destination path');

\Krzysztofzylka\File\File::getExtension('file path')

\Krzysztofzylka\File\File::getContentType('file extension')