Lines Matching refs:entry

61 BDirectory::BDirectory(const BEntry* entry)
65 SetTo(entry);
134 BDirectory::SetTo(const BEntry* entry)
136 if (!entry) {
142 status_t error = _SetTo(entry->fDirFd, entry->fName, true);
147 fDirFd = _kern_open_dir(entry->fDirFd, entry->fName);
224 BDirectory::GetEntry(BEntry* entry) const
226 if (!entry)
230 return entry->SetTo(this, ".", false);
248 BDirectory::FindEntry(const char* path, BEntry* entry, bool traverse) const
250 if (path == NULL || entry == NULL)
253 entry->Unset();
255 // init a potentially abstract entry
258 status = entry->SetTo(this, path, traverse);
260 status = entry->SetTo(path, traverse);
262 // fail, if entry is abstract
263 if (status == B_OK && !entry->Exists()) {
265 entry->Unset();
282 BEntry entry;
284 entry.SetTo(path);
286 entry.SetTo(this, path);
288 return Contains(&entry, nodeFlags);
293 BDirectory::Contains(const BEntry* entry, int32 nodeFlags) const
295 // check, if the entry exists at all
296 if (entry == NULL || !entry->Exists() || InitCheck() != B_OK)
303 result = entry->IsFile();
305 result = entry->IsDirectory();
307 result = entry->IsSymLink();
313 // the entry and check, if the latter is a prefix of the first one.
315 BPath entryPath(entry);
332 BDirectory::GetNextEntry(BEntry* entry, bool traverse)
334 if (entry == NULL)
340 entry->Unset();
343 return entry->SetTo(&ref, traverse);
356 struct dirent* entry = longEntry.dirent();
359 if (GetNextDirents(entry, sizeof(longEntry), 1) != 1)
362 next = (!strcmp(entry->d_name, ".")
363 || !strcmp(entry->d_name, ".."));
366 ref->device = entry->d_pdev;
367 ref->directory = entry->d_pino;
368 return ref->set_name(entry->d_name);
400 struct dirent* entry = longEntry.dirent();
402 if (GetNextDirents(entry, sizeof(longEntry), 1) != 1)
404 if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0)
563 // components. Each time we get a new path, we check, if the entry it
588 BEntry entry;
589 error = entry.SetTo(dirPath.Path(), true);
594 if (entry.Exists()) {
596 if (!entry.IsDirectory()) // but is no directory