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