Daniel ab1334c0cf the whole shebang | vor 10 Jahren | |
---|---|---|
.. | ||
Exception | vor 10 Jahren | |
Tests | vor 10 Jahren | |
.gitignore | vor 10 Jahren | |
CHANGELOG.md | vor 10 Jahren | |
Filesystem.php | vor 10 Jahren | |
LICENSE | vor 10 Jahren | |
README.md | vor 10 Jahren | |
composer.json | vor 10 Jahren | |
phpunit.xml.dist | vor 10 Jahren |
Filesystem provides basic utility to manipulate the file system:
<?php
use Symfony\Component\Filesystem\Filesystem;
$filesystem = new Filesystem();
$filesystem->copy($originFile, $targetFile, $override = false);
$filesystem->mkdir($dirs, $mode = 0777);
$filesystem->touch($files, $time = null, $atime = null);
$filesystem->remove($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->symlink($originDir, $targetDir, $copyOnWindows = false);
$filesystem->makePathRelative($endPath, $startPath);
$filesystem->mirror($originDir, $targetDir, \Traversable $iterator = null, $options = array());
$filesystem->isAbsolutePath($file);
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/Filesystem/
$ composer.phar install --dev
$ phpunit