Method: MetricFu::MD5Tracker.track
- Defined in:
- lib/base/md5_tracker.rb
.track(path_to_file, base_dir) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/base/md5_tracker.rb', line 20 def track(path_to_file, base_dir) md5 = Digest::MD5.hexdigest(File.read(path_to_file)) FileUtils.mkdir_p(md5_dir(path_to_file, base_dir), :verbose => false) f = File.new(md5_file(path_to_file, base_dir), "w") f.puts(md5) f.close md5 end |