Lines Matching defs:ancestor

186 			// ancestor. In practice this complicates the transitions when an
187 // ancestor is created/removed/moved.
190 TRACE(" started to watch ancestor %p (\"%s\", %#" B_PRIx32
553 status_t _StartWatchingAncestors(Ancestor* ancestor,
555 void _StopWatchingAncestors(Ancestor* ancestor,
933 Ancestor* ancestor = NULL;
945 ancestor = new(std::nothrow) Ancestor(ancestor, ancestorPath,
947 TRACE(" created ancestor %p (\"%s\" / \"%s\")\n", ancestor,
948 ancestor->Path().String(), ancestor->Name());
949 if (ancestor == NULL)
953 fRoot = ancestor;
958 fBaseAncestor = ancestor;
975 for (Ancestor* ancestor = startAncestor; ancestor != NULL;
976 ancestor = ancestor->Child()) {
977 status_t error = ancestor->StartWatching(watchFlags, this);
981 if (!ancestor->Exists()) {
982 TRACE(" -> ancestor doesn't exist\n");
986 fAncestors.Insert(ancestor);
1012 PathHandler::_StopWatchingAncestors(Ancestor* ancestor, bool notify)
1029 for (; ancestor != NULL; ancestor = ancestor->Child()) {
1030 if (ancestor->Exists())
1031 fAncestors.Remove(ancestor);
1032 ancestor->StopWatching(this);
1245 debugger("path ancestor exists, but doesn't have a directory");
1256 // is set, or an ancestor might be affected.
1291 // An entry was moved in a true ancestor directory or between true ancestor
1292 // directories. Unless the moved entry was or becomes our base ancestor, we
1301 // ancestor as required.
1356 if (Ancestor* ancestor = _GetAncestor(nodeRef)) {
1357 if (ancestor != fBaseAncestor)
1359 isDirectory = ancestor->IsDirectory();
1382 Ancestor* ancestor = _GetAncestor(nodeRef);
1383 if (ancestor != NULL) {
1384 if (isDirectory == ancestor->IsDirectory()
1385 && entryRef == ancestor->EntryRef()) {
1387 TRACE(" -> we already know the ancestor\n");
1392 if (BEntry(&ancestor->EntryRef()).GetStat(&ancestorStat) == B_OK
1394 == ancestor->NodeRef()
1395 && S_ISDIR(ancestorStat.st_mode) == ancestor->IsDirectory()) {
1396 // Our information for the ancestor is up-to-date, so ignore the
1398 TRACE(" -> we know a different ancestor, but our info is "
1404 TRACE(" -> ancestor mismatch -> resyncing\n");
1406 _StopWatchingAncestors(ancestor, true);
1407 _StartWatchingAncestors(ancestor, true);
1412 ancestor = _GetAncestor(entryRef.DirectoryNodeRef());
1413 if (ancestor != NULL) {
1414 if (ancestor != fBaseAncestor) {
1415 // The directory is a true ancestor -- the notification is only of
1416 // interest, if the entry matches the child ancestor.
1417 Ancestor* childAncestor = ancestor->Child();
1419 TRACE(" -> not an ancestor entry we're interested in "
1426 TRACE(" ancestor entry mismatch -> resyncing\n");
1432 TRACE(" -> starting to watch newly appeared ancestor\n");
1511 Ancestor* ancestor = _GetAncestor(nodeRef);
1512 if (ancestor != NULL) {
1513 // The node is an ancestor. If this is a true match, stop watching the
1514 // ancestor.
1515 if (!ancestor->Exists())
1518 if (entryRef != ancestor->EntryRef()) {
1522 if (BEntry(&ancestor->EntryRef()).GetStat(&ancestorStat) != B_OK) {
1524 _StopWatchingAncestors(ancestor, true);
1529 != ancestor->NodeRef()
1530 || S_ISDIR(ancestorStat.st_mode) != ancestor->IsDirectory()) {
1532 _StopWatchingAncestors(ancestor, true);
1533 _StartWatchingAncestors(ancestor, true);
1541 _StopWatchingAncestors(ancestor, true);
1545 ancestor = _GetAncestor(entryRef.DirectoryNodeRef());
1546 if (ancestor != NULL) {
1547 if (ancestor != fBaseAncestor) {
1548 // The directory is a true ancestor -- the notification cannot be
1549 // of interest, since the node didn't match a known ancestor.