chef
https://github.com/opscode/chef
Ruby
A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.
Chef::ChefFS::FileSystem.copy_to
Copy everything matching the given pattern from src to dest.
After this method completes, everything in dest matching the
given pattern will look identical to src.
==== Attributes
* +pattern+ - Chef::ChefFS::FilePattern to match children under
* +src_root+ - the root from which things will be copied
* +dest_root+ - the root to which things will be copied
* +recurse_depth+ - the maximum depth to copy things. +nil+
means infinite depth. 0 means no recursion.
* +options+ - hash of options:
- +purge+ - if +true+, items in +dest+ that are not in +src+
will be deleted from +dest+. If +false+, these items will
be left alone.
- +force+ - if +true+, matching files are always copied from
+src+ to +dest+. If +false+, they will only be copied if
actually different (which will take time to determine).
- +dry_run+ - if +true+, action will not actually be taken;
things will be printed out instead.
==== Examples
Chef::ChefFS::FileSystem.copy_to(FilePattern.new('/cookbooks'),
chef_fs, local_fs, nil, true) do |message|
puts message
endEdit
git clone [email protected]:opscode/chef.git
cd chef
open lib/chef/chef_fs/file_system.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Chef--ChefFS--FileSystem-copy_to-for-pr
# Commit to gitgit add lib/chef/chef_fs/file_system.rbgit commit -m "better docs for Chef::ChefFS::FileSystem.copy_to"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Chef--ChefFS--FileSystem-copy_to-for-pr
hub pull-request
# Celebrate!