1c1ed15f1Sopenharmony_ci/*
2c1ed15f1Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
3c1ed15f1Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4c1ed15f1Sopenharmony_ci * you may not use this file except in compliance with the License.
5c1ed15f1Sopenharmony_ci * You may obtain a copy of the License at
6c1ed15f1Sopenharmony_ci *
7c1ed15f1Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8c1ed15f1Sopenharmony_ci *
9c1ed15f1Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10c1ed15f1Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11c1ed15f1Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12c1ed15f1Sopenharmony_ci * See the License for the specific language governing permissions and
13c1ed15f1Sopenharmony_ci * limitations under the License.
14c1ed15f1Sopenharmony_ci */
15c1ed15f1Sopenharmony_ci
16c1ed15f1Sopenharmony_ci#ifndef TEST_COMMON_SELINUX_UNIT_TEST_H
17c1ed15f1Sopenharmony_ci#define TEST_COMMON_SELINUX_UNIT_TEST_H
18c1ed15f1Sopenharmony_ci
19c1ed15f1Sopenharmony_ci#include <fstream>
20c1ed15f1Sopenharmony_ci#include <vector>
21c1ed15f1Sopenharmony_ci
22c1ed15f1Sopenharmony_cinamespace OHOS {
23c1ed15f1Sopenharmony_cinamespace Security {
24c1ed15f1Sopenharmony_cinamespace SelinuxUnitTest {
25c1ed15f1Sopenharmony_cibool CreateDirectory(const std::string &path);
26c1ed15f1Sopenharmony_cibool RemoveDirectory(const std::string &path);
27c1ed15f1Sopenharmony_cistd::string GetDirectory(const std::string &path);
28c1ed15f1Sopenharmony_cibool CreateFile(const std::string &path);
29c1ed15f1Sopenharmony_cibool CopyFile(const std::string &src, const std::string &des);
30c1ed15f1Sopenharmony_cibool WriteFile(const std::string &file, const std::vector<std::string> &info);
31c1ed15f1Sopenharmony_ciint RenameFile(const std::string &src, const std::string &des);
32c1ed15f1Sopenharmony_cistd::string RunCommand(const std::string &command);
33c1ed15f1Sopenharmony_ci} // namespace SelinuxUnitTest
34c1ed15f1Sopenharmony_ci} // namespace Security
35c1ed15f1Sopenharmony_ci} // namespace OHOS
36c1ed15f1Sopenharmony_ci#endif // TEST_COMMON_SELINUX_UNIT_TEST_H
37