חזור לתיקייה: files

File

חיפוש בתיקיה
Ctrl K
לחץ כאן או הקש Ctrl K כדי לחפש בכל התיקיה

    File

    02340124

    מבוא לתכנות מערכות

    רשימות הרצאה לקריאה בשבת

    File

    הופק מתוך תקיית התואר של שקד

    uni-folder.vercel.app

    file.cpp

    הערה (קובץ קוד)

    קובץ זה הוא קובץ קוד מסוג 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;
    }