Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit51d9c17

Browse files
committed
[Filesystem] Add docs for Filesystem::mirror() options
1 parent928fdf9 commit51d9c17

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

‎components/filesystem.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,17 @@ contents of the source directory into the target one (use the
255255
:method:`Symfony\\Component\\Filesystem\\Filesystem::copy` method to copy single
256256
files)::
257257

258+
// mirror a directory
258259
$filesystem->mirror('/path/to/source', '/path/to/target');
260+
// mirror with any options
261+
$filesystem->mirror('/path/to/source', '/path/to/target', null, $options);
262+
263+
The following options can be passed:
264+
265+
* ``override`` (default: ``false``): If true, target files newer than origin files are overwritten (see:method:`Symfony\\Component\\Filesystem\\Filesystem::copy`)
266+
* ``copy_on_windows`` (default: ``false``): Whether to copy files instead of links on Windows. Since symfony/filesystem 6.4 this option is deprecated, use follow_symlinks instead.
267+
* ``follow_symlinks`` (default: ``false``): Whether to copy files instead of links, where using symlinks in not working: windows, different drive, docker context not supporting symlinks.
268+
* ``delete`` (default: ``false``): Whether to delete files that are not in the source directory.
259269

260270
``isAbsolutePath``
261271
~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp