minor #26215 Improve the documentation of Filesystem::mirror()
(mnapoli)
This PR was squashed before being merged into the 2.7 branch (closes #26215).
Discussion
----------
Improve the documentation of `Filesystem::mirror()`
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? |no
| New feature? |no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? |no
| Deprecations? |no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass? | ?
| Fixed tickets |
| License | MIT
| Doc PR |
I always end up reading the code of the method to understand what really happens with the default parameters. Hopefully this will clear things up for future me and others.
Replaces #26209 to target the 2.7 branch.
Commits
-------
0e4d26a568
Improve the documentation of
This commit is contained in:
commit
781c64cd37
@ -431,13 +431,18 @@ class Filesystem
|
|||||||
/**
|
/**
|
||||||
* Mirrors a directory to another.
|
* Mirrors a directory to another.
|
||||||
*
|
*
|
||||||
|
* Copies files and directories from the origin directory into the target directory. By default:
|
||||||
|
*
|
||||||
|
* - existing files in the target directory will be overwritten, except if they are newer (see the `override` option)
|
||||||
|
* - files in the target directory that do not exist in the source directory will not be deleted (see the `delete` option)
|
||||||
|
*
|
||||||
* @param string $originDir The origin directory
|
* @param string $originDir The origin directory
|
||||||
* @param string $targetDir The target directory
|
* @param string $targetDir The target directory
|
||||||
* @param \Traversable $iterator A Traversable instance
|
* @param \Traversable $iterator Iterator that filters which files and directories to copy
|
||||||
* @param array $options An array of boolean options
|
* @param array $options An array of boolean options
|
||||||
* Valid options are:
|
* Valid options are:
|
||||||
* - $options['override'] Whether to override an existing file on copy or not (see copy())
|
* - $options['override'] If true, target files newer than origin files are overwritten (see copy(), defaults to false)
|
||||||
* - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink())
|
* - $options['copy_on_windows'] Whether to copy files instead of links on Windows (see symlink(), defaults to false)
|
||||||
* - $options['delete'] Whether to delete files that are not in the source directory (defaults to false)
|
* - $options['delete'] Whether to delete files that are not in the source directory (defaults to false)
|
||||||
*
|
*
|
||||||
* @throws IOException When file type is unknown
|
* @throws IOException When file type is unknown
|
||||||
|
Reference in New Issue
Block a user