Removed DataEditor::SetToAttribute() method.

DataEditor::InitCheck() is now properly working for all types.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6747 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-02-26 05:03:38 +00:00
parent 9993df0f2a
commit 707aa753f3
2 changed files with 3 additions and 20 deletions

View File

@ -224,8 +224,10 @@ DataEditor::SetTo(BEntry &entry, const char *attribute)
if (IsAttribute()) {
attr_info info;
status = fFile.GetAttrInfo(fAttribute, &info);
if (status != B_OK)
if (status != B_OK) {
fFile.Unset();
return status;
}
fSize = info.size;
fType = info.type;
@ -263,27 +265,9 @@ DataEditor::SetTo(BEntry &entry, const char *attribute)
}
status_t
DataEditor::SetToAttribute(const char *attribute)
{
status_t status = InitCheck();
if (status < B_OK)
return status;
fAttribute = attribute;
// ToDo: attributes are not yet supported
return B_ERROR;
}
status_t
DataEditor::InitCheck()
{
if (fAttribute != NULL)
// ToDo: for now!
return B_ERROR;
return fFile.InitCheck();
}

View File

@ -25,7 +25,6 @@ class DataEditor : public BLocker {
status_t SetTo(const char *path, const char *attribute = NULL);
status_t SetTo(entry_ref &ref, const char *attribute = NULL);
status_t SetTo(BEntry &entry, const char *attribute = NULL);
status_t SetToAttribute(const char *attribute);
bool IsReadOnly() const { return fIsReadOnly; }
bool IsDevice() const { return fIsDevice; }