Lines Matching refs:entry

281 		Entry* entry = new(std::nothrow) Entry(clonedName, nameLength, fd,
283 if (entry == NULL) {
288 return entry;
653 // create entry list
715 Entry* entry = it.Next();) {
718 _AddEntry(AT_FDCWD, entry, entry->Name(), pathBuffer);
895 // find the closest ancestor of the entry that is in the added entries
897 Entry* entry = fRootEntry;
898 while (entry != NULL) {
899 if (!entry->IsImplicit()) {
912 entry = entry->GetChild(fileName, length);
922 entry = entry->GetChild(fileName, nextSlash - fileName);
928 // the entry itself or one of its ancestors has been added to the
931 if (entry->FD() >= 0) {
932 if (fstatat(entry->FD(), *fileName != '\0' ? fileName : NULL, &st,
942 // In update mode the entry might already be in the package.
974 // get the .PackageInfo entry attribute
986 fListener->PrintError("%s entry in package file doesn't have data.\n",
993 fListener->PrintError("%s entry in package file has an invalid data "
1037 Entry* entry = it.Next();) {
1040 _UpdateCheckEntryCollisions(fRootAttribute, AT_FDCWD, entry,
1041 entry->Name(), pathBuffer);
1048 int dirFD, Entry* entry, const char* fileName, char* pathBuffer)
1050 bool isImplicitEntry = entry != NULL && entry->IsImplicit();
1054 // Check whether there's an entry attribute for this entry. If not, we can
1055 // ignore this entry.
1064 if (entry != NULL && entry->FD() >= 0) {
1066 fd = entry->FD();
1071 fListener->PrintError("Failed to open entry \"%s\": %s\n",
1122 // the pre-existing entry needs to be a directory too -- we will merge
1131 // this is an implicit entry -- just check the child entries
1132 for (EntryList::ConstIterator it = entry->ChildIterator();
1143 while (dirent* entry = fs_read_attr_dir(attrDir.Get())) {
1145 if (fs_stat_attr(fd, entry->d_name, &attrInfo) < 0) {
1148 "%s\n", entry->d_name, pathBuffer, strerror(errno));
1154 = entryAttribute->FindNodeAttributeChild(entry->d_name);
1188 while (dirent* entry = readdir(dir.Get())) {
1190 if (strcmp(entry->d_name, ".") == 0
1191 || strcmp(entry->d_name, "..") == 0) {
1195 _UpdateCheckEntryCollisions(entryAttribute, fd, NULL, entry->d_name,
1259 Entry* entry = fRootEntry;
1264 entry = _RegisterEntry(entry, fileName, strlen(fileName), fd,
1278 entry = _RegisterEntry(entry, fileName, 1, lastComponent ? fd : -1,
1281 entry = _RegisterEntry(entry, fileName, nextSlash - fileName,
1304 // the entry might already exist
1305 Entry* entry = parent->GetChild(name, nameLength);
1306 if (entry != NULL) {
1307 // If the entry was implicit and is no longer, we mark it non-implicit
1309 if (entry->IsImplicit() && !isImplicit) {
1310 entry->DeleteChildren();
1311 entry->SetImplicit(false);
1312 entry->SetFD(fd);
1316 entry = Entry::Create(name, nameLength, fd, isImplicit);
1317 parent->AddChild(entry);
1320 return entry;
1400 PackageWriterImpl::_AddEntry(int dirFD, Entry* entry, const char* fileName,
1403 bool isImplicitEntry = entry != NULL && entry->IsImplicit();
1413 if (entry != NULL && entry->FD() >= 0) {
1415 fd = entry->FD();
1420 fListener->PrintError("Failed to open entry \"%s\": %s\n",
1442 // In update mode we don't need to add an entry attribute for an implicit
1450 _AddDirectoryChildren(entry, fd, pathBuffer);
1469 fListener->PrintError("Unsupported node type, entry: \"%s\"\n",
1474 // add attribute entry, if it doesn't already exist (update mode, directory)
1528 while (dirent* entry = fs_read_attr_dir(attrDir.Get())) {
1530 if (fs_stat_attr(fd, entry->d_name, &attrInfo) < 0) {
1533 entry->d_name, pathBuffer, strerror(errno));
1537 // create attribute entry
1539 B_HPKG_ATTRIBUTE_ID_FILE_ATTRIBUTE, entry->d_name);
1548 BAttributeDataReader dataReader(fd, entry->d_name, attrInfo.type);
1556 _AddDirectoryChildren(entry, fd, pathBuffer);
1561 PackageWriterImpl::_AddDirectoryChildren(Entry* entry, int fd, char* pathBuffer)
1564 if (entry != NULL && entry->IsImplicit()) {
1565 // this is an implicit entry -- just add it's children
1566 for (EntryList::ConstIterator it = entry->ChildIterator();
1588 while (dirent* entry = readdir(dir.Get())) {
1590 if (strcmp(entry->d_name, ".") == 0
1591 || strcmp(entry->d_name, "..") == 0) {
1595 _AddEntry(fd, NULL, entry->d_name, pathBuffer);