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
2015-01-03 19:45:38 +01:00
..
Exception [2.3] CS And DocBlock Fixes 2014-12-22 16:58:09 +01:00
Tests [Filesystem] enforce umask while testing 2015-01-03 19:45:38 +01:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md Fix #8205 : Deprecate file mode update when calling dumpFile 2014-03-26 08:33:01 +01:00
composer.json updated the branch alias in composer files 2013-01-31 22:39:01 +01:00
Filesystem.php use value of DIRECTORY_SEPARATOR to detect Windows 2014-12-30 12:17:23 +01:00
LICENSE Updated copyright to 2015 2015-01-01 13:56:52 +01:00
phpunit.xml.dist [Tests] Silenced all deprecations in tests for 2.3 2014-12-18 20:00:19 +01:00
README.md Update filesystem readme.md to include exists method 2014-11-16 18:27:15 +01: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->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->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