diff --git a/src/bakatools/file_system/file_watcher.cpp b/src/bakatools/file_system/file_watcher.cpp index 2c083c3..b07caa0 100644 --- a/src/bakatools/file_system/file_watcher.cpp +++ b/src/bakatools/file_system/file_watcher.cpp @@ -10,7 +10,7 @@ namespace Bk::Tools { FileWatcher::~FileWatcher() { stop(); } - void FileWatcher::start(const std::function& action) + void FileWatcher::start(const std::function& action) { std::function task([&]() { @@ -19,7 +19,7 @@ namespace Bk::Tools { { if (!std::filesystem::exists(it->first)) { - action(it->first, FileStatus::Deleted); + action(it->first, FileStat::Deleted); it = paths.erase(it); } else it++; @@ -31,12 +31,12 @@ namespace Bk::Tools { { if(paths[file.path().string()] != current_file_last_write_time) { paths[file.path().string()] = current_file_last_write_time; - action(file.path().string(), FileStatus::Modified); + action(file.path().string(), FileStat::Modified); } } else { paths[file.path().string()] = current_file_last_write_time; - action(file.path().string(), FileStatus::Created); + action(file.path().string(), FileStat::Created); } } }); diff --git a/src/bakatools/file_system/file_watcher.h b/src/bakatools/file_system/file_watcher.h index 9c05b68..a9b446b 100644 --- a/src/bakatools/file_system/file_watcher.h +++ b/src/bakatools/file_system/file_watcher.h @@ -1,9 +1,10 @@ #pragma once -#include -#include +#include +#include + namespace Bk::Tools { - enum class FileStatus + enum class FileStat { Created = 0, Modified = 1, @@ -16,7 +17,7 @@ namespace Bk::Tools { FileWatcher(std::string path, TimeSpan ts); ~FileWatcher(); - void start(const std::function& action); + void start(const std::function& action); void stop(); bool contains(std::string path);