Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions reference/tools/files/basic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ Usage:
copy(self, "*.lib", self.build_folder, os.path.join(self.package_folder, "lib"))


Since Conan 2.32, the ``pattern`` argument also accepts a list or tuple of patterns. When a list
is provided, the source folder is walked only once and every file matching any of the patterns
is copied, which can be significantly faster than calling ``copy()`` several times for large trees:

.. code-block:: python

def package(self):
copy(self, ["*.h", "*.hpp"], self.source_folder,
os.path.join(self.package_folder, "include"))


.. note::

The files that are **symlinks to files** or **symlinks to folders** with be treated like any other file, so they will only
Expand Down