module Conscan::Scanner
Public Class Methods
scan(file_path)
click to toggle source
# File lib/conscan/scanner.rb, line 6 def self.scan file_path stat = File.stat(file_path) ino = stat.ino hash = '0' hash = Digest::MD5.hexdigest(File.read(file_path)) unless File.zero?(file_path) read = 'false' read = 'true' if File.readable?(file_path) write = 'false' write = 'true' if File.writable?(file_path) puts "#{ino}, #{file_path}, #{hash}, #{read}, #{write}" end