Messages Table of Contents     Messages Index

Node Monitor Messages

The Node Monitor is a mechanism that lets you watch for changes to a particular file or directory (or "node"). You ask the Node Monitor to start or stop watching a given node by calling the watch_node() function; you can stop all monitoring through the stop_watching() function.

When you call watch_node(), you tell the Node Monitor which aspects of the node you want to track—changes to its name, to its size, its attributes, and so on. Each of these "trackable" elements corresponds to a particular type of message (identified by the message's "opcode" field) that's sent back to your application when that element actually changes (when the file is renamed, changes size, gains an attribute, and so on).


B_ENTRY_CREATED

Field Type code Description
"opcode" B_INT32_TYPE B_ENTRY_CREATED indicates that a new entry was created.
"name" B_STRING_TYPE The name of the new entry.
"directory" B_INT64_TYPE The ino_t (node) number for the directory in which the entry was created.
"device" B_INT32_TYPE The dev_t number of the device on which the new entry resides.
"node" B_INT64_TYPE The ino_t number of the new entry itself. (More accurately, it identifies the node that corresponds to the entry.)


B_ENTRY_REMOVED

Field Type code Description
"opcode" B_INT32_TYPE B_ENTRY_REMOVED indicates that an entry was removed.
"directory" B_INT64_TYPE The ino_t (node) number of the directory from which the entry was removed.
"device" B_INT32_TYPE The dev_t number of the device that the removed node used to live on.
"node" B_INT64_TYPE The ino_t number of the node that was removed.


B_ENTRY_MOVED

Field Type code Description
"opcode" B_INT32_TYPE B_ENTRY_MOVED indicates that an existing entry moved from one directory to another.
"name" B_STRING_TYPE The name of the entry that moved.
"from directory" B_INT64_TYPE The ino_t (node) number of the directory from that the node was removed from.
"to directory" B_INT64_TYPE The ino_t (node) number of the directory that the node was added to.
"device" B_INT32_TYPE The dev_t number of the device that the moved node entry lives on. (You can't move a file between devices, so this value will be apply to the file's old and new locations.)
"node" B_INT64_TYPE The ino_t number of the node that was removed.


B_STAT_CHANGED

Field Type code Description
"opcode" B_INT32_TYPE B_STAT_CHANGED indicates that some statistic of a node (as recorded in its stat structure) changed.
"node" B_INT64_TYPE The ino_t number of the node.
"device" B_INT32_TYPE The dev_t number of the node's device.


B_ATTR_CHANGED

Field Type code Description
"opcode" B_INT32_TYPE B_ATTR_CHANGED indicates that some attribute of a node changed.
"node" B_INT64_TYPE The ino_t number of the node.
"device" B_INT32_TYPE The dev_t number of the node's device.


B_DEVICE_MOUNTED

Field Type code Description
"opcode" B_INT32_TYPE B_DEVICE_MOUNTED indicates that a new device (or file system volume) has been mounted.
"new device" B_INT32_TYPE The dev_t number of the newly-mounted device.
"device" B_INT32_TYPE The dev_t number of the device that holds the directory of the new device's mount point.
"directory" B_INT64_TYPE The ino_t (node) number of the directory that acts as the new device's mount point.


B_DEVICE_UNMOUNTED

Field Type code Description
"opcode" B_INT32_TYPE B_DEVICE_UNMOUNTED indicates that a device has been unmounted.
"new device" B_INT32_TYPE The dev_t number of the unmounted device.


Messages Table of Contents     Messages Index


The Be Book,
...in lovely HTML...
for BeOS Release 5.

Copyright © 2000 Be, Inc. All rights reserved..