1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
5 #ifndef COMMON_STEP_FILESYSTEM_STEP_RECOVER_STORAGE_DIRECTORIES_H_
6 #define COMMON_STEP_FILESYSTEM_STEP_RECOVER_STORAGE_DIRECTORIES_H_
8 #include <manifest_parser/utils/logging.h>
12 #include "common/installer_context.h"
13 #include "common/step/recovery/step_recovery.h"
15 namespace common_installer {
16 namespace filesystem {
19 * @brief recovers data and shared directories of application
21 * Part of Recovery Mode. Is responsible for restoring data and shared
22 * directories in case partial update occurs.
24 class StepRecoverStorageDirectories : public recovery::StepRecovery {
26 using StepRecovery::StepRecovery;
28 Status RecoveryNew() override;
29 Status RecoveryUpdate() override;
30 Status RecoveryMountUpdate() override;
34 * @brief moves directories
35 * @param in_src path of the source location
36 * @param in_dst path of the destination location
37 * @param key directory name
38 * @return true if operation successful
40 bool MoveAppStorage(const std::filesystem::path& in_src,
41 const std::filesystem::path& in_dst,
44 STEP_NAME(RecoverStorageDirectories)
47 } // namespace filesystem
48 } // namespace common_installer
50 #endif // COMMON_STEP_FILESYSTEM_STEP_RECOVER_STORAGE_DIRECTORIES_H_