Lines Matching defs:name

21 	Create(Inode* inode, Inode* parent, const char* name, int32 mode,
32 if (name != NULL)
33 strlcpy(fName, name, sizeof(fName));
60 Remove(Inode* inode, const char* name)
65 strlcpy(fName, name, sizeof(fName));
556 attributes to real files. Used for system attributes like the name.
561 const char* name, int32 bytes)
571 if (*item->Name() == FILE_NAME_NAME || !strcmp(name, item->Name()))
608 || attributes->Remove(transaction, name) < B_OK) {
665 const char* name)
667 if (name == NULL)
677 while (!item->IsLast(node) && strcmp(item->Name(), name)) {
714 const char* name, uint32 type, off_t pos, const uint8* data, size_t length,
719 if (node == NULL || name == NULL || data == NULL)
723 uint32 nameLength = strlen(name);
734 // Find the last item or one with the same name we have to add
737 while (!item->IsLast(node) && strcmp(item->Name(), name)) {
765 if (_MakeSpaceForSmallData(transaction, node, name, needed)
772 while (!item->IsLast(node) && strcmp(item->Name(), name)) {
830 if (_MakeSpaceForSmallData(transaction, node, name, spaceNeeded) < B_OK)
846 strcpy(item->Name(), name);
903 /*! Finds the attribute "name" in the small data section, and
908 Inode::FindSmallData(const bfs_inode* node, const char* name) const
915 if (!strcmp(smallData->Name(), name))
922 /*! Returns a pointer to the node's name if present in the small data
941 /*! Copies the node's name into the provided buffer.
954 const char* name = Name(node.Node());
955 if (name == NULL)
958 strlcpy(buffer, name, size);
963 /*! Changes or set the name of a file: in the inode small_data section only, it
970 Inode::SetName(Transaction& transaction, const char* name)
972 if (name == NULL || *name == '\0')
983 (uint8*)name, strlen(name), true);
988 Inode::_RemoveAttribute(Transaction& transaction, const char* name,
1001 if ((hasIndex || fVolume->CheckForLiveQuery(name))
1002 && GetAttribute(name, &attribute) == B_OK) {
1006 index->Update(transaction, name, attribute->Type(), data,
1014 if ((status = attributes->Remove(transaction, name)) < B_OK)
1044 Inode::ReadAttribute(const char* name, int32 type, off_t pos, uint8* buffer,
1059 small_data* smallData = FindSmallData(node.Node(), name);
1078 status_t status = GetAttribute(name, &attribute);
1094 Inode::WriteAttribute(Transaction& transaction, const char* name, int32 type,
1114 bool hasIndex = index.SetTo(name) == B_OK;
1119 if (GetAttribute(name, &attribute) != B_OK) {
1130 small_data* smallData = FindSmallData(node.Node(), name);
1146 status = _AddSmallData(transaction, node, name, type, pos, buffer,
1152 status = _RemoveSmallData(transaction, node, name);
1157 status = CreateAttribute(transaction, name, type, &attribute);
1174 if (hasIndex || fVolume->CheckForLiveQuery(name)) {
1201 status = _AddSmallData(transaction, node, name, type, pos, buffer,
1207 status = _RemoveAttribute(transaction, name, false, NULL);
1249 index.Update(transaction, name, type, oldData, oldLength,
1266 Inode::RemoveAttribute(Transaction& transaction, const char* name)
1269 bool hasIndex = index.SetTo(name) == B_OK;
1279 small_data* smallData = FindSmallData(node.Node(), name);
1284 index.Update(transaction, name, smallData->Type(),
1289 status = _RemoveSmallData(transaction, node, name);
1292 status = _RemoveAttribute(transaction, name, hasIndex, &index);
1304 /*! Returns the attribute inode with the specified \a name, in case it exists.
1309 Inode::GetAttribute(const char* name, Inode** _attribute)
1318 FATAL(("get_vnode() failed in Inode::GetAttribute(name = \"%s\")\n",
1319 name));
1330 status_t status = tree->Find((uint8*)name, (uint16)strlen(name), &id);
1358 Inode::CreateAttribute(Transaction& transaction, const char* name, uint32 type,
1374 return Inode::Create(transaction, attributes, name,
1388 char name[MAX_INDEX_KEY_LENGTH + 1];
1391 while (iterator.GetNextEntry(name, &length, MAX_INDEX_KEY_LENGTH + 1,
1399 if (++count > 2 || (strcmp(".", name) != 0 && strcmp("..", name) != 0))
2369 char name[B_FILE_NAME_LENGTH];
2373 while (iterator.GetNext(name, &length, &type, &id) == B_OK) {
2374 RemoveAttribute(transaction, name);
2521 Inode::Remove(Transaction& transaction, const char* name, ino_t* _id,
2531 if (fTree->Find((uint8*)name, (uint16)strlen(name), &id) < B_OK)
2542 return fTree->Remove(transaction, name, id);
2545 T(Remove(inode, name));
2567 if (fTree->Remove(transaction, name, id) != B_OK && !force) {
2573 if (fTree->Find((uint8*)name, (uint16)strlen(name), &id) == B_OK) {
2585 // are updated here (name, size, & last_modified)
2589 index.RemoveName(transaction, name, inode);
2611 \a name may be \c NULL, but only if no \a parent is given.
2620 Inode::Create(Transaction& transaction, Inode* parent, const char* name,
2624 FUNCTION_START(("name = %s, mode = %" B_PRId32 "\n", name, mode));
2652 if (tree->Find((uint8*)name, (uint16)strlen(name), &offset) == B_OK) {
2724 T(Create(inode, parent, name, mode, openMode, type));
2748 // only add the name to regular files, directories, or symlinks
2751 && inode->SetName(transaction, name) != B_OK)
2766 status = tree->Insert(transaction, name, inode->ID());
2779 // Update the main indices (name, size & last_modified)
2783 if (inode->InNameIndex() && name != NULL) {
2784 // the name index only contains regular files
2785 // (but not the root node where name == NULL)
2786 status = index.InsertName(transaction, name, inode);
2792 tree->Remove(transaction, name, inode->ID());
2807 // harmed; they are considered less important than the "name" index.
2880 AttributeIterator::GetNext(char* name, size_t* _length, uint32* _type,
2907 strncpy(name, item->Name(), B_FILE_NAME_LENGTH);
2932 " = %" B_PRIdINO ",name = \"%s\")\n", fInode->ID(), name));
2940 " = %" B_PRIdINO ",name = \"%s\")\n", fInode->ID(), name));
2947 status_t status = fIterator->GetNextEntry(name, &length,