OSDN Git Service

Add Expand Different Subfolders menu item (#1964)
[winmerge-jp/winmerge-jp.git] / Src / DirWatcher.h
1 /** 
2  * @file  DirWatcher.h
3  *
4  * @brief Declaration file for DirWatcher
5  */
6 #pragma once
7
8 #include "UnicodeString.h"
9 #include <functional>
10
11 class DirWatcher
12 {
13 public:
14         enum ACTION { ACTION_ADDED = 1, ACTION_REMOVED, ACTION_MODIFIED, ACTION_RENAMED_OLD_NAME, ACTION_RENAMED_NEW_NAME };
15         DirWatcher();
16         ~DirWatcher();
17         bool Add(uintptr_t id, bool dir, const String& path, std::function<void(const String&, ACTION)> callback);
18         bool Remove(uintptr_t id);
19         void Clear();
20 private:
21         class Impl;
22         std::unique_ptr<Impl> m_pimpl;
23 };
24