Class | PhusionPassenger::Utils::FileSystemWatcher::FileInfo
In: | lib/phusion_passenger/utils/file_system_watcher.rb
Parent: | Object

### Methods

changed? new

### Public Class methods

new(filename, stat)

[Source]

         # File lib/phusion_passenger/utils/file_system_watcher.rb, line 160
    160:                         def initialize(filename, stat)
    161:                                 @filename = filename
    162:                                 @stat = stat
    163:                         end

### Public Instance methods

changed?(check_mtime = true)

[Source]

         # File lib/phusion_passenger/utils/file_system_watcher.rb, line 165
    165:                         def changed?(check_mtime = true)
    166:                                 new_stat = File.stat(@filename)
    167:                                 if check_mtime
    168:                                         mtime_changed = @stat.mtime != new_stat.mtime || @stat.size != new_stat.size
    169:                                 else
    170:                                         mtime_changed = false
    171:                                 end
    172:                                 return @stat.ino != new_stat.ino || @stat.ftype != new_stat.ftype || mtime_changed
    173:                         rescue Errno::EACCES, Errno::ENOENT
    174:                                 return true
    175:                         end

[Validate]