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

DeleteAction

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

    DeleteAction

    02340124

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

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

    DeleteAction

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

    uni-folder.vercel.app

    deleteaction.h

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

    קובץ זה הוא קובץ קוד מסוג C.

    #pragma once
    
    #include <string>
    
    #include "Directory.h"
    
    /**
     * @class DeleteAction
     * A subtype of Action, it deletes the wanted file from the system.
     */
    class DeleteAction : public Action {
    public:
        virtual ~DeleteAction() = default;
    
        /**
         * Creates the action with the necessary ingredients to delete a file.
         * @param folder the folder the file that will be deleted is in. (the parent folder)
         * @param fileName the name of the file to be deleted.
         */
        DeleteAction(Directory& folder, const std::string& fileName);
    
        /**
         * @brief Executes the action
         */
        virtual void execute() const override;
    
    private:
        Directory& folder;
        const std::string fileName;
    };