blob: 45bfca44139bc6467394e61f2ee1e0950529d78a [file] [log] [blame]
Adriana Kobylak7e8d76b2018-04-20 10:03:01 -05001#pragma once
2
Adriana Kobylaka9074342018-05-08 11:52:44 -05003#include <experimental/filesystem>
4
Adriana Kobylak7e8d76b2018-04-20 10:03:01 -05005namespace phosphor
6{
7namespace software
8{
9namespace manager
10{
11
Adriana Kobylaka9074342018-05-08 11:52:44 -050012namespace fs = std::experimental::filesystem;
13
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 */
Adriana Kobylaka9074342018-05-08 11:52:44 -050035 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