* Use new header layout in PathMonitor.h
* Honor 80 char/line limit in PathMonitor.cpp git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26788 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3896078543
commit
b5bc41debf
|
@ -18,17 +18,19 @@
|
|||
namespace BPrivate {
|
||||
|
||||
class BPathMonitor {
|
||||
public:
|
||||
static status_t StartWatching(const char* path, uint32 flags, BMessenger target);
|
||||
public:
|
||||
static status_t StartWatching(const char* path, uint32 flags,
|
||||
BMessenger target);
|
||||
|
||||
static status_t StopWatching(const char* path, BMessenger target);
|
||||
static status_t StopWatching(BMessenger target);
|
||||
static status_t StopWatching(const char* path,
|
||||
BMessenger target);
|
||||
static status_t StopWatching(BMessenger target);
|
||||
|
||||
private:
|
||||
BPathMonitor();
|
||||
~BPathMonitor();
|
||||
private:
|
||||
BPathMonitor();
|
||||
~BPathMonitor();
|
||||
|
||||
static status_t _InitIfNeeded();
|
||||
static status_t _InitIfNeeded();
|
||||
};
|
||||
|
||||
} // namespace BPrivate
|
||||
|
|
|
@ -189,7 +189,8 @@ PathHandler::PathHandler(const char* path, uint32 flags, BMessenger target)
|
|||
|
||||
fStatus = _AddDirectory(nodeRef);
|
||||
|
||||
// TODO: work-around for existing files (should not watch the directory in this case)
|
||||
// TODO: work-around for existing files (should not watch the directory in
|
||||
// this case)
|
||||
BEntry entry(path);
|
||||
if (entry.Exists() && !entry.IsDirectory())
|
||||
_AddFile(entry);
|
||||
|
@ -223,7 +224,8 @@ PathHandler::Dump()
|
|||
printf("WATCHING DIRECTORIES:\n");
|
||||
DirectorySet::iterator i = fDirectories.begin();
|
||||
for (; i != fDirectories.end(); i++) {
|
||||
printf(" %ld:%Ld (%s)\n", i->node.device, i->node.node, i->contained ? "contained" : "-");
|
||||
printf(" %ld:%Ld (%s)\n", i->node.device, i->node.node, i->contained
|
||||
? "contained" : "-");
|
||||
}
|
||||
|
||||
printf("WATCHING FILES:\n");
|
||||
|
@ -539,7 +541,8 @@ PathHandler::_IsContained(BEntry& entry) const
|
|||
|
||||
|
||||
bool
|
||||
PathHandler::_HasDirectory(const node_ref& nodeRef, bool* _contained /* = NULL */) const
|
||||
PathHandler::_HasDirectory(const node_ref& nodeRef,
|
||||
bool* _contained /* = NULL */) const
|
||||
{
|
||||
watched_directory directory;
|
||||
directory.node = nodeRef;
|
||||
|
|
Loading…
Reference in New Issue