Lines Matching refs:directory

138 	DirCookie(Directory* directory)
140 fDirectory(directory)
150 void SetTo(Directory* directory, bool skipArtificialEntries)
152 fDirectory = directory;
267 // no (empty) attribute directory
280 // The attribute directory has changed in the meantime -- get rid
286 // get the attribute directory node
295 ERROR("checksumfs: attribute directory (%" B_PRIu64 ") of node %"
296 B_PRIu64 " is not a directory!\n", blockIndex,
421 Directory* directory
423 if (directory == NULL)
429 // Since we need to lock both nodes (the directory and the entry's), this
431 // directory read-locked, then drop the read lock, write-lock both nodes
439 NodeReadLocker directoryLocker(directory);
442 status_t error = directory->LookupEntry(name, blockIndex);
460 error = transaction.AddNodes(directory, childNode);
465 error = directory->LookupEntry(name, blockIndex);
477 status_t error = check_access(directory, W_OK);
486 // directory must be empty
493 error = directory->RemoveEntry(name, transaction);
500 directory->Touched(NODE_MODIFIED);
510 return transaction.Commit(EntryRemovedNotification(directory, name,
596 create_file(Volume* volume, Directory* directory, const char* name,
603 // Start the transaction and add the directory. We only need a read lock
609 directoryLocked = transaction.IsNodeLocked(directory);
611 error = transaction.AddNode(directory);
613 error = transaction.StartAndAddNode(directory);
619 error = directory->LookupEntry(name, blockIndex);
631 // We can (must even) unlock the directory now. The file won't go
634 transaction.RemoveNode(directory);
652 // check the directory write permission
653 error = check_access(directory, W_OK);
657 // don't create an entry in an unlinked directory
658 if (directory->HardLinks() == 0)
668 error = directory->InsertEntry(name, newFile->BlockIndex(), transaction);
682 newFile->SetParentDirectory(directory->BlockIndex());
684 directory->Touched(NODE_MODIFIED);
712 error = transaction.Commit(EntryCreatedNotification(directory, name,
728 /*! Gets the node's attribute directory.
729 If a transaction is given and the attribute directory doesn't exist, a new
731 On success the caller gets a reference to the attribute directory and is
733 directory must be put after committing/aborting the transaction.
743 // get the attribute directory node
752 ERROR("checksumfs: attribute directory (%" B_PRIu64 ") of node %"
753 B_PRIu64 " is not a directory!\n", blockIndex,
758 // no (i.e. empty) attribute directory yet
778 // We have published the attribute directory, so don't delete it when
994 Directory* directory = dynamic_cast<Directory*>(node);
995 if (directory == NULL)
998 status_t error = check_access(directory, X_OK);
1007 blockIndex = directory->BlockIndex();
1009 blockIndex = directory->ParentDirectory();
1011 status_t error = directory->LookupEntry(name, blockIndex);
1169 Directory* directory
1171 if (directory == NULL)
1177 status_t error = check_access(directory, W_OK);
1181 // start a transaction and add the directory (write locks it, too)
1183 error = transaction.StartAndAddNode(directory);
1187 // don't create an entry in an unlinked directory
1188 if (directory->HardLinks() == 0)
1203 error = directory->InsertEntry(name, newSymLink->BlockIndex(), transaction);
1210 directory->Touched(NODE_MODIFIED);
1213 return transaction.Commit(EntryCreatedNotification(directory, name,
1224 Directory* directory = dynamic_cast<Directory*>((Node*)dir->private_node);
1225 if (directory == NULL)
1241 error = transaction.AddNodes(directory, node);
1246 error = check_access(directory, W_OK);
1250 // don't create an entry in an unlinked directory
1251 if (directory->HardLinks() == 0)
1255 error = directory->InsertEntry(name, node->BlockIndex(), transaction);
1261 directory->Touched(NODE_MODIFIED);
1264 return transaction.Commit(EntryCreatedNotification(directory, name, node));
1291 // node). To make that atomic, we have to lock the source directory, look up
1292 // the entry, unlock the directory, get the node, re-lock all, and look up
1348 // don't create an entry in an unlinked directory
1352 // Check whether this operation would move a directory into one of its
1354 // target directory is the moved directory (if it is a directory that is).
1371 // Everything looks good -- insert a new entry in the target directory and
1372 // remove the old entry from the source directory.
1541 Directory* directory
1543 if (directory == NULL)
1553 status_t error = create_file(volume, directory, name, openMode, permissions,
1665 // #pragma mark - directory operations
1673 Directory* directory
1675 if (directory == NULL)
1681 status_t error = check_access(directory, W_OK);
1685 // start a transaction and attach the directory (write locks it, too)
1687 error = transaction.StartAndAddNode(directory);
1691 // don't create an entry in an unlinked directory
1692 if (directory->HardLinks() == 0)
1695 // create a directory node
1701 // insert the new directory
1702 error = directory->InsertEntry(name, newDirectory->BlockIndex(),
1709 newDirectory->SetParentDirectory(directory->BlockIndex());
1711 directory->Touched(NODE_MODIFIED);
1714 return transaction.Commit(EntryCreatedNotification(directory, name,
1729 Directory* directory = dynamic_cast<Directory*>((Node*)vnode->private_node);
1730 if (directory == NULL)
1733 NodeReadLocker nodeLocker(directory);
1735 // don't allow opening an attribute directory this way
1736 if ((directory->Mode() & S_ATTR_DIR) != 0)
1739 status_t error = check_access(directory, R_OK);
1743 DirCookie* cookie = new(std::nothrow) DirCookie(directory);
1795 // #pragma mark - attribute directory operations
1889 // are involved is: node -> attribute directory -> attribute.
1900 // get the attribute directory (create, if necessary)
1954 // Get the node's attribute directory (don't create it, if it doesn't exist
1958 // attributes are involved is: node -> attribute directory -> attribute.
2138 // get the attribute directory
2180 // if the attribute directory is empty now, remove it too
2287 /* index directory & index operations */
2359 /* directory operations */
2368 /* attribute directory operations */