This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Filesystem
Fabien Potencier 7f3be5c49d fixed CS
2012-12-11 11:40:22 +01:00
..
Exception [Filesystem] Added few new behaviors: 2012-06-18 12:38:47 +02:00
Tests Filesystem Component mirror symlinked directory fix 2012-11-20 14:21:32 +01:00
.gitattributes Fix export-ignore on Windows 2012-11-08 10:51:48 +01:00
CHANGELOG.md Add Changelog BC Break note 2012-06-18 13:46:07 +02:00
composer.json Removed useless branch alias for dev-master in composer.json 2012-12-06 11:00:55 +01:00
Filesystem.php fixed CS 2012-12-11 11:40:22 +01:00
LICENSE Added LICENSE 2011-12-22 19:42:52 +01:00
phpunit.xml.dist [Components] Tests/Autoloading fixes 2012-05-01 17:51:41 +02:00
README.md [Filesystem] Added few new behaviors: 2012-06-18 12:38:47 +02:00

Filesystem Component

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);

Resources

You can run the unit tests with the following command:

phpunit