Methods
Attributes
| [R] | source | |
| [R] | target |
Class Public methods
new(vpath)
Link
update(argv)
Link
Instance Public methods
copy(name)
Link
def_options(opt = (require 'optparse'; OptionParser.new))
Link
make(*args)
Link
source=(source)
Link
target=(target)
Link
update()
Link
update!()
Link
update?()
Link
# File tool/checksum.rb, line 21 def update? src = @vpath.read(@source) @len = src.length @sum = src.sum return false unless @vpath.search(File.method(:exist?), @target) begin data = @vpath.read(@checksum) rescue return false else return false unless data[/src="([0-9a-z_.-]+)",/, 1] == @source return false unless @len == data[/\blen=(\d+)/, 1].to_i return false unless @sum == data[/\bchecksum=(\d+)/, 1].to_i return true end end