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
2013-09-27 16:57:51 +02:00
..
Exception [Filesystem] removed getPath() on Exceptions and cleaned up CS and error messages 2013-09-27 16:57:51 +02:00
Tests [Filesystem] removed getPath() on Exceptions and cleaned up CS and error messages 2013-09-27 16:57:51 +02:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md Mitigate dependency upon ConfigCache 2013-04-21 16:28:50 +02:00
composer.json updated version to 2.4 2013-05-16 09:54:39 +02:00
Filesystem.php [Filesystem] removed getPath() on Exceptions and cleaned up CS and error messages 2013-09-27 16:57:51 +02:00
LICENSE Merge branch '2.0' into 2.1 2013-01-04 18:00:54 +01:00
phpunit.xml.dist made usage of Composer autoloader for subtree-split unit tests 2012-11-09 14:10:06 +01:00
README.md updated the composer install command to reflect changes in Composer 2013-09-18 09:27:26 +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:

$ cd path/to/Symfony/Component/Filesystem/
$ composer.phar install
$ phpunit