From 51d9c175f9c904f1aa9615712f90c8dc7f924d55 Mon Sep 17 00:00:00 2001 From: Maximilian Beckers Date: Mon, 5 Jun 2023 10:53:31 +0200 Subject: [PATCH] [Filesystem] Add docs for Filesystem::mirror() options --- components/filesystem.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/filesystem.rst b/components/filesystem.rst index a3be1bad5ab..e6bb61db6c1 100644 --- a/components/filesystem.rst +++ b/components/filesystem.rst @@ -255,7 +255,17 @@ contents of the source directory into the target one (use the :method:`Symfony\\Component\\Filesystem\\Filesystem::copy` method to copy single files):: + // mirror a directory $filesystem->mirror('/path/to/source', '/path/to/target'); + // mirror with any options + $filesystem->mirror('/path/to/source', '/path/to/target', null, $options); + +The following options can be passed: + + * ``override`` (default: ``false``): If true, target files newer than origin files are overwritten (see :method:`Symfony\\Component\\Filesystem\\Filesystem::copy`) + * ``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. + * ``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. + * ``delete`` (default: ``false``): Whether to delete files that are not in the source directory. ``isAbsolutePath`` ~~~~~~~~~~~~~~~~~~