Lines Matching defs:ref
56 entry_ref::entry_ref(const entry_ref& ref)
58 device(ref.device),
59 directory(ref.directory),
62 set_name(ref.name);
90 entry_ref::operator==(const entry_ref& ref) const
92 return (device == ref.device
93 && directory == ref.directory
94 && (name == ref.name
95 || (name != NULL && ref.name != NULL
96 && strcmp(name, ref.name) == 0)));
101 entry_ref::operator!=(const entry_ref& ref) const
103 return !(*this == ref);
108 entry_ref::operator=(const entry_ref& ref)
110 if (this == &ref)
113 device = ref.device;
114 directory = ref.directory;
115 set_name(ref.name);
142 BEntry::BEntry(const entry_ref* ref, bool traverse)
148 SetTo(ref, traverse);
231 BEntry::SetTo(const entry_ref* ref, bool traverse)
234 if (ref == NULL)
237 // if ref-name is absolute, let the path-only SetTo() do the job
238 if (BPrivate::Storage::is_absolute_path(ref->name))
239 return SetTo(ref->name, traverse);
242 int dirFD = _kern_open_dir_entry_ref(ref->device, ref->directory, NULL);
245 return (fCStatus = _SetTo(dirFD, ref->name, traverse));
277 BEntry::GetRef(entry_ref* ref) const
282 if (ref == NULL)
289 ref->device = st.st_dev;
290 ref->directory = st.st_ino;
291 error = ref->set_name(fName);
354 // get a node ref for the directory and init it
360 node_ref ref;
361 ref.device = st.st_dev;
362 ref.node = st.st_ino;
363 return dir->SetTo(&ref);
802 get_ref_for_path(const char* path, entry_ref* ref)
804 status_t error = path && ref ? B_OK : B_BAD_VALUE;
809 error = entry.GetRef(ref);