Class: Fanotify::FileHandle

Inherits:
Data
  • Object
show all
Defined in:
lib/fanotify/file_handle.rb

Overview

Opaque filesystem identifier reported by the kernel.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fsid:, type:, bytes:) ⇒ FileHandle

Returns a new instance of FileHandle.



6
7
8
# File 'lib/fanotify/file_handle.rb', line 6

def initialize(fsid:, type:, bytes:)
  super(fsid: fsid.b.freeze, type:, bytes: bytes.b.freeze)
end

Instance Attribute Details

#bytesObject (readonly)

Returns the value of attribute bytes

Returns:

  • (Object)

    the current value of bytes



5
6
7
# File 'lib/fanotify/file_handle.rb', line 5

def bytes
  @bytes
end

#fsidObject (readonly)

Returns the value of attribute fsid

Returns:

  • (Object)

    the current value of fsid



5
6
7
# File 'lib/fanotify/file_handle.rb', line 5

def fsid
  @fsid
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



5
6
7
# File 'lib/fanotify/file_handle.rb', line 5

def type
  @type
end

Instance Method Details

#to_sObject



10
# File 'lib/fanotify/file_handle.rb', line 10

def to_s = bytes.unpack1("H*")