Lines Matching defs:entry

58 BDirectory::BDirectory(const BEntry* entry)
62 SetTo(entry);
130 BDirectory::SetTo(const BEntry* entry)
132 if (!entry) {
138 status_t error = _SetTo(entry->fDirFd, entry->fName, true);
143 error = set_dir_fd(_kern_open_dir(entry->fDirFd, entry->fName));
217 BDirectory::GetEntry(BEntry* entry) const
219 if (!entry)
223 return entry->SetTo(this, ".", false);
228 BDirectory::FindEntry(const char* path, BEntry* entry, bool traverse) const
230 if (path == NULL || entry == NULL)
233 entry->Unset();
235 // init a potentially abstract entry
238 status = entry->SetTo(this, path, traverse);
240 status = entry->SetTo(path, traverse);
242 // fail, if entry is abstract
243 if (status == B_OK && !entry->Exists()) {
245 entry->Unset();
262 BEntry entry;
264 entry.SetTo(path);
266 entry.SetTo(this, path);
268 return Contains(&entry, nodeFlags);
273 BDirectory::Contains(const BEntry* entry, int32 nodeFlags) const
275 // check, if the entry exists at all
276 if (entry == NULL || !entry->Exists() || InitCheck() != B_OK)
283 result = entry->IsFile();
285 result = entry->IsDirectory();
287 result = entry->IsSymLink();
293 // the entry and check, if the latter is a prefix of the first one.
295 BPath entryPath(entry);
312 BDirectory::GetNextEntry(BEntry* entry, bool traverse)
314 if (entry == NULL)
320 entry->Unset();
323 return entry->SetTo(&ref, traverse);
336 struct dirent* entry = longEntry.dirent();
339 if (GetNextDirents(entry, sizeof(longEntry), 1) != 1)
342 next = (!strcmp(entry->d_name, ".")
343 || !strcmp(entry->d_name, ".."));
348 return ref->set_name(entry->d_name);
380 struct dirent* entry = longEntry.dirent();
382 if (GetNextDirents(entry, sizeof(longEntry), 1) != 1)
384 if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0)
546 // components. Each time we get a new path, we check, if the entry it
571 BEntry entry;
572 error = entry.SetTo(dirPath.Path(), true);
577 if (entry.Exists()) {
579 if (!entry.IsDirectory()) // but is no directory