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 38f03bd2f5 Merge branch '2.3' into 2.6
* 2.3:
  [FrameworkBundle] Fix title and placeholder rendering in php form templates.
  RequestDataCollector - small fix
  renamed composer.phar to composer to be consistent with the Symfony docs
  [FrameworkBundle] bumped min version of Routing to 2.3
  removed composer --dev option everywhere
  fixed a test
  [Console] Fixed output bug, if escaped string in a formatted string.
  [Security] Remove ContextListener's onKernelResponse listener as it is used
  Revert "minor #12652 [HttpFoundation] [Hackday] #9942 test: Request::getContent() for null value (skler)"
  Revert "fixed assertion"
  fixed assertion
  [HttpFoundation] [Hackday] #9942 test: Request::getContent() for null value
  fixed URL
  Add reference to documentation in FormEvents phpdocs
  [YAML] Fix one-liners to work with multiple new lines
  Keep "pre" meaning for var_dump quick-and-dirty debug
  [Console][Table] Fix cell padding with multi-byte

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_attributes.html.php
	src/Symfony/Bundle/FrameworkBundle/composer.json
	src/Symfony/Component/Console/Helper/TableHelper.php
2015-02-11 08:12:14 +01:00
..
Exception Merge branch '2.3' into 2.5 2014-12-22 17:29:52 +01:00
Tests Merge branch '2.5' into 2.6 2015-01-03 22:13:09 +01:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md [Filesystem] Added a lock handler 2014-09-12 16:19:59 +02:00
composer.json updated version to 2.6 2014-05-23 16:36:49 +02:00
Filesystem.php use value of DIRECTORY_SEPARATOR to detect Windows 2014-12-31 10:20:32 +01:00
LICENSE Updated copyright to 2015 2015-01-01 13:56:52 +01:00
LockHandler.php [Filesystem] fix lock file permissions 2014-11-30 11:30:45 +01:00
phpunit.xml.dist [Tests] Silenced all deprecations in tests for 2.3 2014-12-18 20:00:19 +01:00
README.md renamed composer.phar to composer to be consistent with the Symfony docs 2015-02-08 08:41:14 +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 install
$ phpunit