2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 ///////////////////////////////////////////////////////////////////////////////
18 /// \ingroup tag_SS_LoggerService
19 /// \brief This file contains declaration of class CFSDirectory.
21 ///////////////////////////////////////////////////////////////////////////////
22 #ifndef LOGGER_SERVICE_SERVER_INCLUDE_SS_LOGGER_FS_DIRECTORY_H_
23 #define LOGGER_SERVICE_SERVER_INCLUDE_SS_LOGGER_FS_DIRECTORY_H_
24 #include <native_service/frameworkunified_types.h>
27 // Class to provide file system directory operations like create,delete etc.
30 ////////////////////////////////////////////////////////////////////////////////////////////////
32 /// Constructor of CFSDirectory class
38 ////////////////////////////////////////////////////////////////////////////////////////////////
41 ////////////////////////////////////////////////////////////////////////////////////////////////
43 /// Destructor of CFSDirectory class
49 ////////////////////////////////////////////////////////////////////////////////////////////////
52 ////////////////////////////////////////////////////////////////////////////////////////////
53 /// This method is used to check if the directory exists.
55 /// \param [in] f_cDirPath
56 /// std::string - Path of the directory to delete.
59 /// EFrameworkunifiedStatus - success or error
60 ////////////////////////////////////////////////////////////////////////////////////////////
61 static BOOL DoesDirectoryExist(std::string &f_cDirPath); // NOLINT (runtime/references)
63 ////////////////////////////////////////////////////////////////////////////////////////////
64 /// This method is used to create a directory.
66 /// \param [in] f_cDirPath
67 /// std::string - Path of the directory to delete.
70 /// EFrameworkunifiedStatus - success or error
71 ////////////////////////////////////////////////////////////////////////////////////////////
72 static EFrameworkunifiedStatus CreateDirectory(std::string &f_cDirPath); // NOLINT (runtime/references)
74 ////////////////////////////////////////////////////////////////////////////////////////////
75 /// This method is used to verify directory.
77 /// \param [in] f_cPath
78 /// std::string - Path of the directory to delete.
81 /// EFrameworkunifiedStatus - success or error
82 ////////////////////////////////////////////////////////////////////////////////////////////
83 static BOOL IsDirectory(std::string &f_cPath); // NOLINT (runtime/references)
85 ////////////////////////////////////////////////////////////////////////////////////////////
86 /// This method is used to delete directory.
88 /// \param [in] f_cPath
89 /// std::string - Path of the directory to delete.
92 /// EFrameworkunifiedStatus - success or error
93 ////////////////////////////////////////////////////////////////////////////////////////////
94 static BOOL RemoveDirectory(std::string &f_cPath); // NOLINT (runtime/references)
96 ////////////////////////////////////////////////////////////////////////////////////////////
97 /// This method is used to delete file in direcotry.
99 /// \param [in] f_cPath
100 /// std::string - Path of the directory to delete.
103 /// EFrameworkunifiedStatus - success or error
104 ////////////////////////////////////////////////////////////////////////////////////////////
105 static BOOL RemoveSubDirectory(std::string &f_cPath); // NOLINT (runtime/references)
108 #endif // LOGGER_SERVICE_SERVER_INCLUDE_SS_LOGGER_FS_DIRECTORY_H_