הערה (קובץ קוד)
קובץ זה הוא קובץ קוד מסוג CPP.
#include "File.h"
File::File(const std::string& name, Directory* parent)
: name(name), parent(parent) {
}
std::string File::getName() const {
return name;
}
Directory* File::getParent() const {
return parent;
}
File& File::operator[](const std::vector<std::string>& path) {
std::list<std::string> pathList(path.begin(), path.end());
return (*this)[pathList];
}
const File& File::operator[](const std::vector<std::string>& path) const {
std::list<std::string> pathList(path.begin(), path.end());
return (*this)[pathList];
}
bool File::canBeDeleted() const {
return true;
}