Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # src, dest are strings
- # on_dir, on_file are Procs
- def copy_transform src, dest, on_dir, on_file
- # walking src recursively
- # call the appropriate block to make the transformation happen
- # use the the result to create a directory of file
- end
- Net::SSH.start(<host>, <usr>) do |ssh|
- # redirect all the write and/or read operations like:
- # mkdir, cp, mv, rm
- # to the ssh-object given to the block
- copy_transform 'src', 'dest', proc1, proc2
- # restore every stream
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement