/*! \brief Returns whether the directory represented by this BDirectory is a root directory of a volume. \return - \c true, if the BDirectory is properly initialized and represents a root directory of some volume, - \c false, otherwise. */ bool BDirectory::IsRootDirectory() const { // compare the directory's node ID with the ID of the root node of the FS bool result = false; node_ref ref; fs_info info; if (GetNodeRef(&ref) == B_OK && fs_stat_dev(ref.device, &info) == 0) result = (ref.node == info.root); return result; }
/*! Tests whether this and the supplied BNode object are equal. Two BNode objects are said to be equal if they're set to the same node, or if they're both \c B_NO_INIT. \param node the BNode to be compared with \return \c true, if the BNode objects are equal, \c false otherwise */ bool BNode::operator==(const BNode &node) const { if (fCStatus == B_NO_INIT && node.InitCheck() == B_NO_INIT) return true; if (fCStatus == B_OK && node.InitCheck() == B_OK) { // compare the node_refs node_ref ref1, ref2; if (GetNodeRef(&ref1) != B_OK) return false; if (node.GetNodeRef(&ref2) != B_OK) return false; return (ref1 == ref2); } return false; }
SerializableNodeRef CScriptSerializableNode::clone() const { return GetNodeRef(clonePtr()); }
SerializableNodeRef CPropertyNode::clone() const { return GetNodeRef(BEHAVIAC_NEW CPropertyNode(this->m_pAgent, this->m_tag.c_str())); }
SerializableNodeRef CTextNode::clone() const { return GetNodeRef(BEHAVIAC_NEW CTextNode(m_constXmlNode->clone())); }