Method: Backup::Syncer::Cloud::LocalFile.find
- Defined in:
- lib/backup/syncer/cloud/local_file.rb
.find(dir, excludes = []) ⇒ Object
Returns a Hash of LocalFile objects for each file within dir, except those matching any of the excludes. Hash keys are the file’s path relative to dir.
16 17 18 19 20 21 22 23 |
# File 'lib/backup/syncer/cloud/local_file.rb', line 16 def find(dir, excludes = []) dir = File.(dir) hash = {} find_md5(dir, excludes).each do |file| hash[file.path.sub(dir + '/', '')] = file end hash end |