PHP code example of t4web / filesystem
1. Go to this page and download the library: Download t4web/filesystem 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/ */
t4web / filesystem example snippets
use T4web\Filesystem\Filesystem;
$filesystem = new Filesystem();
$filesystem->isWritable($filename);
$filesystem->isDir($filename);
$filesystem->put($filename, $data, $flags = FILE_APPEND);
$filesystem->copy($originFile, $targetFile, $override = false);
$filesystem->mkdir($dirs, $mode = 0777);
$filesystem->touch($files, $time = null, $atime = null);
$filesystem->remove($files);
$filesystem->exists($files);
$filesystem->chmod($files, $mode, $umask = 0000, $recursive = false);
$filesystem->chown($files, $user, $recursive = false);
$filesystem->chgrp($files, $group, $recursive = false);
$filesystem->rename($origin, $target);
$filesystem->isReadable($filename);
$filesystem->symlink($originDir, $targetDir, $copyOnWindows = false);
$filesystem->makePathRelative($endPath, $startPath);
$filesystem->mirror($originDir, $targetDir, \Traversable $iterator = null, $options = array());
$filesystem->isAbsolutePath($file);
$filesystem->tempnam($dir, $prefix);
$filesystem->dumpFile($filename, $content);
bash
$ php composer.phar update