Adriana Kobylak | 7e8d76b | 2018-04-20 10:03:01 -0500 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Adriana Kobylak | c98d912 | 2020-05-05 10:36:01 -0500 | [diff] [blame] | 3 | #include <filesystem> |
Adriana Kobylak | a907434 | 2018-05-08 11:52:44 -0500 | [diff] [blame] | 4 | |
Adriana Kobylak | 7e8d76b | 2018-04-20 10:03:01 -0500 | [diff] [blame] | 5 | namespace phosphor |
| 6 | { |
| 7 | namespace software |
| 8 | { |
| 9 | namespace manager |
| 10 | { |
| 11 | |
Adriana Kobylak | c98d912 | 2020-05-05 10:36:01 -0500 | [diff] [blame] | 12 | namespace fs = std::filesystem; |
Adriana Kobylak | a907434 | 2018-05-08 11:52:44 -0500 | [diff] [blame] | 13 | |
Adriana Kobylak | 7e8d76b | 2018-04-20 10:03:01 -0500 | [diff] [blame] | 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; |
Adriana Kobylak | b072d1b | 2018-04-24 11:37:21 -0500 | [diff] [blame] | 28 | |
| 29 | /** |
| 30 | * @brief Process requested file or directory. |
Adriana Kobylak | a907434 | 2018-05-08 11:52:44 -0500 | [diff] [blame] | 31 | * @param[in] mask - The inotify mask. |
| 32 | * @param[in] entryPath - The file or directory to process. |
Adriana Kobylak | b072d1b | 2018-04-24 11:37:21 -0500 | [diff] [blame] | 33 | * @param[out] result - 0 if successful. |
| 34 | */ |
Adriana Kobylak | a907434 | 2018-05-08 11:52:44 -0500 | [diff] [blame] | 35 | int processEntry(int mask, const fs::path& entryPath); |
Adriana Kobylak | 7e8d76b | 2018-04-20 10:03:01 -0500 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | } // namespace manager |
| 39 | } // namespace software |
| 40 | } // namespace phosphor |