]> git.immae.eu Git - github/wallabag/wallabag.git/blob - vendor/symfony/filesystem/Symfony/Component/Filesystem/README.md
twig implementation
[github/wallabag/wallabag.git] / vendor / symfony / filesystem / Symfony / Component / Filesystem / README.md
1 Filesystem Component
2 ====================
3
4 Filesystem provides basic utility to manipulate the file system:
5
6 ```php
7 <?php
8
9 use Symfony\Component\Filesystem\Filesystem;
10
11 $filesystem = new Filesystem();
12
13 $filesystem->copy($originFile, $targetFile, $override = false);
14
15 $filesystem->mkdir($dirs, $mode = 0777);
16
17 $filesystem->touch($files, $time = null, $atime = null);
18
19 $filesystem->remove($files);
20
21 $filesystem->chmod($files, $mode, $umask = 0000, $recursive = false);
22
23 $filesystem->chown($files, $user, $recursive = false);
24
25 $filesystem->chgrp($files, $group, $recursive = false);
26
27 $filesystem->rename($origin, $target);
28
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 ```
37
38 Resources
39 ---------
40
41 You can run the unit tests with the following command:
42
43 $ cd path/to/Symfony/Component/Filesystem/
44 $ composer.phar install --dev
45 $ phpunit