Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 46 lines (26 sloc) 1.05 kb
8376fa5 @willdurand Added README
willdurand authored
1 Filesystem Component
2 ====================
3
4 Filesystem provides basic utility to manipulate the file system:
5
9355c28 @romainneutron [Filesystem] Added few new behaviors:
romainneutron authored
6 ```php
7 <?php
8376fa5 @willdurand Added README
willdurand authored
8
9355c28 @romainneutron [Filesystem] Added few new behaviors:
romainneutron authored
9 use Symfony\Component\Filesystem\Filesystem;
8376fa5 @willdurand Added README
willdurand authored
10
9355c28 @romainneutron [Filesystem] Added few new behaviors:
romainneutron authored
11 $filesystem = new Filesystem();
8376fa5 @willdurand Added README
willdurand authored
12
9355c28 @romainneutron [Filesystem] Added few new behaviors:
romainneutron authored
13 $filesystem->copy($originFile, $targetFile, $override = false);
8376fa5 @willdurand Added README
willdurand authored
14
9355c28 @romainneutron [Filesystem] Added few new behaviors:
romainneutron authored
15 $filesystem->mkdir($dirs, $mode = 0777);
8376fa5 @willdurand Added README
willdurand authored
16
9355c28 @romainneutron [Filesystem] Added few new behaviors:
romainneutron authored
17 $filesystem->touch($files, $time = null, $atime = null);
8376fa5 @willdurand Added README
willdurand authored
18
9355c28 @romainneutron [Filesystem] Added few new behaviors:
romainneutron authored
19 $filesystem->remove($files);
8376fa5 @willdurand Added README
willdurand authored
20
9355c28 @romainneutron [Filesystem] Added few new behaviors:
romainneutron authored
21 $filesystem->chmod($files, $mode, $umask = 0000, $recursive = false);
8376fa5 @willdurand Added README
willdurand authored
22
9355c28 @romainneutron [Filesystem] Added few new behaviors:
romainneutron authored
23 $filesystem->chown($files, $user, $recursive = false);
8376fa5 @willdurand Added README
willdurand authored
24
9355c28 @romainneutron [Filesystem] Added few new behaviors:
romainneutron authored
25 $filesystem->chgrp($files, $group, $recursive = false);
8376fa5 @willdurand Added README
willdurand authored
26
9355c28 @romainneutron [Filesystem] Added few new behaviors:
romainneutron authored
27 $filesystem->rename($origin, $target);
8376fa5 @willdurand Added README
willdurand authored
28
9355c28 @romainneutron [Filesystem] Added few new behaviors:
romainneutron authored
29 $filesystem->symlink($originDir, $targetDir, $copyOnWindows = false);
30
31 $filesystem->makePathRelative($endPath, $startPath);
32
33 $filesystem->mirror($originDir, $targetDir, \Traversable $iterator = null, $options = array());
34
35 $filesystem->isAbsolutePath($file);
36 ```
8376fa5 @willdurand Added README
willdurand authored
37
b258e1d @willdurand [Components] Tests/Autoloading fixes
willdurand authored
38 Resources
39 ---------
40
41 You can run the unit tests with the following command:
42
f384ec6 @fabpot made usage of Composer autoloader for subtree-split unit tests
fabpot authored
43 $ cd path/to/Symfony/Component/Filesystem/
dffe0df @fabpot updated the composer install command to reflect changes in Composer
fabpot authored
44 $ composer.phar install
f384ec6 @fabpot made usage of Composer autoloader for subtree-split unit tests
fabpot authored
45 $ phpunit
Something went wrong with that request. Please try again.