Module: FSWatcher
- Defined in:
- lib/doozer/watcher.rb
Overview
Util classes for the FileSystemWatcher
Defined Under Namespace
Classes: Directory, FoundFile, InvalidDirectoryError, InvalidFileError
Class Method Summary collapse
-
.genFileMD5(fileName) ⇒ Object
utility function for generating md5s from a files contents.
Class Method Details
.genFileMD5(fileName) ⇒ Object
utility function for generating md5s from a files contents
353 354 355 356 357 358 359 360 361 |
# File 'lib/doozer/watcher.rb', line 353 def FSWatcher.genFileMD5(fileName) if FileTest.file?(fileName) then f = File.open(fileName) contents = f.read() f.close() return MD5.new(contents) if contents end return nil end |