In file include/NodeMonitorHelpers.h:

class DirectoryMonitor : public NodeMonitor

Extends the node monitor class by adding directory-specific notifications

Inheritance:

DirectoryMonitor < NodeMonitor


Protected Methods

virtual void EntryCreated(const char *created_name, ino_t created_node)
This hook function is called when a completely new entry is created in the monitored directory
virtual void EntryRemoved(ino_t node)
This hook function is called when a node is removed (deleted) from the monitored directory
virtual void EntryMovedIn(node_ref &from_directory, const char *name_of_node, ino_t node)
This hook function is called when a node was moved to the monitored directory
virtual void EntryMovedOut(node_ref &to_directory, const char *name_of_node, ino_t node)
This hook function is called when a node was moved out of the monitored directory

Inherited from NodeMonitor:

Public Methods

status_t InitCheck()

Public

File system utility functions

static entry_ref GetEntryRef(node_ref &from_directory, const char *name)
This is a utility function that obtains an entry_ref for a name in a directory node
static BEntry GetEntry(node_ref &from_directory, const char *name)
This is a utility function that obtains a BEntry for a name in the given directory node
static BDirectory GetDirectory(node_ref &directory_ref)
This is a utility function that converts a directory node_ref to a BDirectory object

Protected Fields

node_ref mTargetEntry
const BStatable* mWatched

Protected Methods

virtual void EntryDeleted(node_ref &fromDirectory)
virtual void EntryMoved(node_ref &from_directory, node_ref &to_directory, const char *newName)
virtual void StatChanged()
virtual void AttributeChanged(const char *which)

Documentation

Extends the node monitor class by adding directory-specific notifications
virtual void EntryCreated(const char *created_name, ino_t created_node)
This hook function is called when a completely new entry is created in the monitored directory. This doesn't include entries that are moved into this directory from some other directory--see EntryMovedIn.)
Parameters:
created_name - The name of the entry that was just created in the monitored directory.
created_node - The node number for the entry that was just created in the monitored directory.
See Also:
EntryMovedIn

virtual void EntryRemoved(ino_t node)
This hook function is called when a node is removed (deleted) from the monitored directory.

Note that the node number is most likely no longer valid, unless you are keeping a reference to it your program. This can be done just by keeping a BFile object around for the node, as described in the storage kit.

The entry that the node is associated with, however, is long gone, and that is why there is no name parameter to this function.

Parameters:
node - The number of the entry removed from this directory.

virtual void EntryMovedIn(node_ref &from_directory, const char *name_of_node, ino_t node)
This hook function is called when a node was moved to the monitored directory. Recall that nodes can move only inside the same volume: you can reuse the volume identifiers from mTargetEntry.
Parameters:
from_directory - A node_ref to the directory that the node moved out of to come to the monitored directory.
name_of_node - The name of entry that moved in.
node - The node number of the entry that moved in.

virtual void EntryMovedOut(node_ref &to_directory, const char *name_of_node, ino_t node)
This hook function is called when a node was moved out of the monitored directory. Recall that nodes can move only inside the same volume: you can reuse the volume identifiers from mTargetEntry.
Parameters:
from_directory - A node_ref to the directory that the node moved to from the monitored directory.
name_of_node - The name of entry that moved out.
node - The node number of the entry that moved out.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de