In file include/PathMonitor.h:

class PathMonitor : public NodeMonitor

A PathMonitor just follows the path of a file as it moves and is renamed

Inheritance:

PathMonitor < NodeMonitor


Public Methods

PathMonitor(BEntry &toWatch)
Begins monitoring the path of a BEntry
virtual ~PathMonitor()
Stops watching the BEntry.
void GetPath(BPath *newPath)
Returns the current path of the monitored file system node.
virtual void PathChanged(BPath &oldPath)
Override this to get notifications when the path changes.

Protected Fields

BPath mPath
Derived classes can get the current path by using this data member
BLocker mPathLocker
This protects the mPath object

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

A PathMonitor just follows the path of a file as it moves and is renamed
PathMonitor(BEntry &toWatch)
Begins monitoring the path of a BEntry. Recall that BEntry is the ancestor to BDirectory, BSymLink, and BFile. The entry that is passed in must be valid and concrete, which is to say that it must point to an entry that exists in the file system. BEntry::Exists() must return true.

virtual ~PathMonitor()
Stops watching the BEntry.

void GetPath(BPath *newPath)
Returns the current path of the monitored file system node.

virtual void PathChanged(BPath &oldPath)
Override this to get notifications when the path changes.

BPath mPath
Derived classes can get the current path by using this data member
See Also:
mPathLocker

BLocker mPathLocker
This protects the mPath object. Lock it only while you need to use it.
See Also:
BAutoLocker in the storage kit


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