Class: FM::FMFile

Inherits:
Object
  • Object
show all
Defined in:
lib/fm/file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fsize, path, digest, mtime, itime = Time.now) ⇒ FMFile

Returns a new instance of FMFile.



10
11
12
13
14
15
16
# File 'lib/fm/file.rb', line 10

def initialize(fsize, path, digest, mtime, itime = Time.now)
    @fsize = fsize
    @digest = digest
    @path = path
    @mtime = mtime
    @itime = itime      # Last index time.
end

Instance Attribute Details

#digestObject (readonly)

Returns the value of attribute digest.



5
6
7
# File 'lib/fm/file.rb', line 5

def digest
  @digest
end

#fsizeObject (readonly)

Returns the value of attribute fsize.



4
5
6
# File 'lib/fm/file.rb', line 4

def fsize
  @fsize
end

#itimeObject

Returns the value of attribute itime.



8
9
10
# File 'lib/fm/file.rb', line 8

def itime
  @itime
end

#mtimeObject

Returns the value of attribute mtime.



7
8
9
# File 'lib/fm/file.rb', line 7

def mtime
  @mtime
end

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/fm/file.rb', line 6

def path
  @path
end