#include <syncer.h>
|
| using | rename_pair_t = std::pair<fs::path, fs::path> |
| |
| using | on_sync_progress_t = std::function<void(size_t completed, size_t total, const std::string& current_job)> |
| |
| using | on_entry_created_t = std::function<void(const std::string&, const fs::path&, const std::vector<fs::path>&, bool)> |
| |
| using | on_entry_modified_t = std::function<void(const std::string&, const fs::path&, const std::vector<fs::path>&, bool)> |
| |
| using | on_entry_removed_t = std::function<void(const std::string&, const fs::path&, const std::vector<fs::path>&)> |
| |
| using | on_entry_renamed_t = std::function<void(const std::string&, const rename_pair_t&, const std::vector<rename_pair_t>&)> |
| |
| using | mapping_t = std::unordered_map<std::string, mapping> |
| |
|
| | syncer ()=default |
| |
| | ~syncer () |
| |
| void | set_mapping (const std::string &ref_ext, const std::vector< std::string > &synced_ext, on_entry_created_t on_entry_created, on_entry_modified_t on_entry_modified, on_entry_removed_t on_entry_removed, on_entry_renamed_t on_entry_renamed) |
| | Remaps a specific extension of the reference directory to extensions of the synced directory. You will get notified with entries of the synced directory with 'synced_ext' when an entry with the ref_ext in the reference directory gets changed.
|
| |
| void | set_directory_mapping (on_entry_created_t on_entry_created, on_entry_modified_t on_entry_modified, on_entry_removed_t on_entry_removed, on_entry_renamed_t on_entry_renamed) |
| |
| void | sync (const fs::path &reference_dir, const fs::path &synced_dir, const on_sync_progress_t &on_progress=nullptr) |
| | Start syncing the synced_dir with reference to the reference_dir i.e changes that occur in the reference_dir will be reported on entries in the synced_dir.
|
| |
| void | unsync () |
| | Stops syncing.
|
| |
Definition at line 13 of file syncer.h.
◆ mapping_t
◆ on_entry_created_t
◆ on_entry_modified_t
◆ on_entry_removed_t
◆ on_entry_renamed_t
◆ on_sync_progress_t
◆ rename_pair_t
◆ syncer()
◆ ~syncer()
◆ set_directory_mapping()
◆ set_mapping()
Remaps a specific extension of the reference directory to extensions of the synced directory. You will get notified with entries of the synced directory with 'synced_ext' when an entry with the ref_ext in the reference directory gets changed.
Definition at line 78 of file syncer.cpp.
◆ sync()
| void fs::syncer::sync |
( |
const fs::path & | reference_dir, |
|
|
const fs::path & | synced_dir, |
|
|
const on_sync_progress_t & | on_progress = nullptr ) |
Start syncing the synced_dir with reference to the reference_dir i.e changes that occur in the reference_dir will be reported on entries in the synced_dir.
Definition at line 148 of file syncer.cpp.
◆ unsync()
| void fs::syncer::unsync |
( |
| ) |
|
The documentation for this class was generated from the following files: