diff options
author | Oskar <[email protected]> | 2024-10-24 22:28:05 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-10-24 22:28:05 +0200 |
commit | 52430face266fe677577e95a2f00a69270d984e9 (patch) | |
tree | 1cc2dfea99a7408b2035412fe459736faa264de2 /trashsystem2.hpp | |
parent | 985c87d2b06cdebb005a37422c39de702d28915e (diff) |
split up restore file with another function find_by_id and slight modification to directory_entry class
Diffstat (limited to 'trashsystem2.hpp')
-rw-r--r-- | trashsystem2.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/trashsystem2.hpp b/trashsystem2.hpp index 83c1ead..5b1f116 100644 --- a/trashsystem2.hpp +++ b/trashsystem2.hpp @@ -60,17 +60,20 @@ private: class directory_entry { public: - directory_entry(std::filesystem::path dep, bool isd = false, bool isr = false, bool iso = false): - _de_path(dep), _is_dir(isd), _is_reg(isr), _is_other(iso) {} + directory_entry(std::filesystem::path dep, bool isd = false, bool isr = false, bool iso = false, TS_FUNCTION_RESULT isf = FUNCTION_SUCCESS): + _de_path(dep), _is_dir(isd), _is_reg(isr), _is_other(iso), _function_result(isf) {} bool is_reg() const { return _is_reg; } bool is_dir() const { return _is_dir; } bool is_other() const { return _is_other; } + TS_FUNCTION_RESULT get_function_result () const { return _function_result; } const std::filesystem::path &rget_path() const { return _de_path; } + void set_fail() { _function_result = FUNCTION_FAILURE; } private: std::filesystem::path _de_path; bool _is_dir = false; bool _is_reg = false; bool _is_other = false; + TS_FUNCTION_RESULT _function_result = FUNCTION_SUCCESS; }; class trashsys_log_info { |