Class: Fam::Event

Class | Fam::Event
In: | fam.c (CVS)
Parent: | Data

### Methods

code file filename host hostname num req req_num reqnum request request_num request_number to_s

### Constants

CHANGED | = | INT2FIX(FAMChanged) |  | define event codes
DELETED | = | INT2FIX(FAMDeleted)
START_EXECUTING | = | INT2FIX(FAMStartExecuting)
STOP_EXECUTING | = | INT2FIX(FAMStopExecuting)
CREATED | = | INT2FIX(FAMCreated)
MOVED | = | INT2FIX(FAMMoved)
ACKNOWLEDGE | = | INT2FIX(FAMAcknowledge)
ACK | = | INT2FIX(FAMAcknowledge)
EXISTS | = | INT2FIX(FAMExists)
END_EXIST | = | INT2FIX(FAMEndExist)

### Public Instance methods

code()

Return the code (type) of a Fam::Event object.

Note: see the file doc/event_codes.txt for a brief description of each event code.

Examples:

      code = ev.code

file()

Alias for filename

filename()

Return the filename of a Fam::Event object.

Note: for directory monitors, this method returns the path of the file relative to the monitor directory, not the full path.

Aliases:

      Fam::Event#file

Examples:

      path = ev.filename
      path = ev.file

host()

Alias for hostname

hostname()

Return the hostname of a Fam::Event object.

Note: some versions of FAM (ex. the Debian package) ship without remote support. In those instances, this method will always return "localhost".

Aliases:

      Fam::Event#host

Examples:

      host = ev.hostname
      host = ev.host

num()

Alias for reqnum

req()

Alias for reqnum

req_num()

Alias for reqnum

reqnum()

Return the request number of a Fam::Event object.

Aliases:

      Fam::Event#request_number
      Fam::Event#request_num
      Fam::Event#request
      Fam::Event#req_num
      Fam::Event#req
      Fam::Event#num

Examples:

      req = ev.request_number

request()

Alias for reqnum

request_num()

Alias for reqnum

request_number()

Alias for reqnum

to_s()

Return a human-readable string-representation of a Fam::Event object.

Examples:

      puts 'event: ' << ev.to_s

[Validate]