midday-commander
Loading...
Searching...
No Matches
Entry.h
Go to the documentation of this file.
1//
2// Created by Vojtěch Pašek on 11.05.2023.
3//
4
5#ifndef MIDDAY_COMMANDER_ENTRY_H
6#define MIDDAY_COMMANDER_ENTRY_H
7
8#include <filesystem>
9
10#include "Modifier.h"
11
15class Entry {
16public:
17 std::filesystem::path path;
18
19 explicit Entry(std::filesystem::path path);
20 virtual ~Entry() = default;
21
22 virtual void print(Modifier modifier) const = 0;
23
24 virtual bool isFile() = 0;
25 virtual bool isFolder() = 0;
26 virtual bool isSymlink() = 0;
27
28 virtual bool remove() = 0;
29 virtual bool copy(std::filesystem::path target) = 0;
30 virtual bool move(std::filesystem::path target) = 0;
31};
32
33#endif //MIDDAY_COMMANDER_ENTRY_H
Modifier
Used to modify Entry.print()
Definition: Modifier.h:11
An abstract class representing a general FileView entry.
Definition: Entry.h:15
virtual bool move(std::filesystem::path target)=0
virtual void print(Modifier modifier) const =0
virtual bool remove()=0
virtual bool copy(std::filesystem::path target)=0
std::filesystem::path path
Definition: Entry.h:17
virtual ~Entry()=default
virtual bool isFolder()=0
virtual bool isFile()=0
virtual bool isSymlink()=0