1 #pragma once
2 
3 #include <filesystem>
4 
5 namespace phosphor
6 {
7 namespace software
8 {
9 namespace manager
10 {
11 
12 namespace fs = std::filesystem;
13 
14 /** @class Sync
15  *  @brief Contains filesystem sync functions.
16  *  @details The software manager class that contains functions to perform
17  *           sync operations.
18  */
19 class Sync
20 {
21   public:
22     Sync() = default;
23     Sync(const Sync&) = delete;
24     Sync& operator=(const Sync&) = delete;
25     Sync(Sync&&) = default;
26     Sync& operator=(Sync&&) = default;
27     ~Sync() = default;
28 
29     /**
30      * @brief Process requested file or directory.
31      * @param[in] mask - The inotify mask.
32      * @param[in] entryPath - The file or directory to process.
33      * @param[out] result - 0 if successful.
34      */
35     int processEntry(int mask, const fs::path& entryPath);
36 };
37 
38 } // namespace manager
39 } // namespace software
40 } // namespace phosphor
41