blob: 82fe266bf5dd450d152b220ff7f9b231341056cb [file] [log] [blame]
Adriana Kobylak7e8d76b2018-04-20 10:03:01 -05001#pragma once
2
Adriana Kobylakc98d9122020-05-05 10:36:01 -05003#include <filesystem>
Adriana Kobylaka9074342018-05-08 11:52:44 -05004
Adriana Kobylak7e8d76b2018-04-20 10:03:01 -05005namespace phosphor
6{
7namespace software
8{
9namespace manager
10{
11
Adriana Kobylakc98d9122020-05-05 10:36:01 -050012namespace fs = std::filesystem;
Adriana Kobylaka9074342018-05-08 11:52:44 -050013
Adriana Kobylak7e8d76b2018-04-20 10:03:01 -050014/** @class Sync
15 * @brief Contains filesystem sync functions.
16 * @details The software manager class that contains functions to perform
17 * sync operations.
18 */
19class 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 Kobylakb072d1b2018-04-24 11:37:21 -050028
29 /**
30 * @brief Process requested file or directory.
Adriana Kobylaka9074342018-05-08 11:52:44 -050031 * @param[in] mask - The inotify mask.
32 * @param[in] entryPath - The file or directory to process.
Adriana Kobylakb072d1b2018-04-24 11:37:21 -050033 * @param[out] result - 0 if successful.
34 */
Pavithra Barithayac5f6e7e2024-06-24 09:50:21 -050035 static int processEntry(int mask, const fs::path& entryPath);
Adriana Kobylak7e8d76b2018-04-20 10:03:01 -050036};
37
38} // namespace manager
39} // namespace software
40} // namespace phosphor