This commit is contained in:
@ -23,6 +23,7 @@
|
||||
#define INCLUDE_DRIVES_DIRECTORY_CACHE_HPP_
|
||||
|
||||
#include "utils/single_thread_service_base.hpp"
|
||||
#include <memory>
|
||||
|
||||
namespace repertory {
|
||||
class directory_iterator;
|
||||
@ -33,7 +34,7 @@ public:
|
||||
|
||||
private:
|
||||
struct open_directory {
|
||||
directory_iterator *iterator{nullptr};
|
||||
std::shared_ptr<directory_iterator> iterator{};
|
||||
std::chrono::system_clock::time_point last_update{
|
||||
std::chrono::system_clock::now()};
|
||||
};
|
||||
@ -59,12 +60,16 @@ public:
|
||||
void execute_action(const std::string &api_path,
|
||||
const execute_callback &execute);
|
||||
|
||||
[[nodiscard]] auto get_directory(directory_iterator *iterator)
|
||||
-> std::shared_ptr<directory_iterator>;
|
||||
|
||||
[[nodiscard]] auto remove_directory(const std::string &api_path)
|
||||
-> directory_iterator *;
|
||||
-> std::shared_ptr<directory_iterator>;
|
||||
|
||||
void remove_directory(directory_iterator *iterator);
|
||||
|
||||
void set_directory(const std::string &api_path, directory_iterator *iterator);
|
||||
void set_directory(const std::string &api_path,
|
||||
std::shared_ptr<directory_iterator> iterator);
|
||||
};
|
||||
} // namespace repertory
|
||||
|
||||
|
Reference in New Issue
Block a user