1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by a apache 2.0 license that can be
3 // found in the LICENSE file.
5 #ifndef COMMON_STEP_FILESYSTEM_STEP_REMOVE_TEMPORARY_DIRECTORY_H_
6 #define COMMON_STEP_FILESYSTEM_STEP_REMOVE_TEMPORARY_DIRECTORY_H_
8 #include <manifest_parser/utils/logging.h>
12 #include "common/step/recovery/step_recovery.h"
14 namespace common_installer {
15 namespace filesystem {
18 * @brief removes temp directories if install gets
21 * Part of Recovery Mode. If recovery mode gets called
22 * path to temporary unpack directory and its content get
25 class StepRemoveTemporaryDirectory : public recovery::StepRecovery {
27 using StepRecovery::StepRecovery;
29 Status RecoveryNew() override;
30 Status RecoveryUpdate() override;
31 Status Cleanup() override;
34 virtual bool ClearPath(const std::filesystem::path& path);
39 * Removes all the temporary files
43 STEP_NAME(RemoveTemporaryDirectory)
46 } // namespace filesystem
47 } // namespace common_installer
49 #endif // COMMON_STEP_FILESYSTEM_STEP_REMOVE_TEMPORARY_DIRECTORY_H_