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 /// \defgroup <<Group Tag>> <<Group Name>>
19 /// \ingroup tag_NS_NPPService
21 ////////////////////////////////////////////////////////////////////////////////////////////////////
23 ////////////////////////////////////////////////////////////////////////////////////////////////////
24 /// \ingroup tag_NS_NPPService
25 /// \brief This file contains declaration of class CFSDirectory.
29 ////////////////////////////////////////////////////////////////////////////////////////////////////
31 #ifndef NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_FS_DIRECTORY_H_
32 #define NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_FS_DIRECTORY_H_
33 #include <native_service/frameworkunified_types.h>
38 // Class to provide file system directory operations like create,delete etc.
41 ////////////////////////////////////////////////////////////////////////////////////////////////
43 /// Constructor of CFSDirectory class
49 ////////////////////////////////////////////////////////////////////////////////////////////////
52 ////////////////////////////////////////////////////////////////////////////////////////////////
54 /// Destructor of CFSDirectory class
60 ////////////////////////////////////////////////////////////////////////////////////////////////
63 ////////////////////////////////////////////////////////////////////////////////////////////
64 /// This method is used to check if the directory exists.
66 /// \param [in] f_cdirpath
67 /// std::string - Path of the directory to delete.
70 /// EFrameworkunifiedStatus - success or error
71 ////////////////////////////////////////////////////////////////////////////////////////////
72 static BOOL DoesDirecotryExist(const std::string &f_cdirpath);
74 ////////////////////////////////////////////////////////////////////////////////////////////
75 /// This method is used to create a directory.
77 /// \param [in] f_cdirpath
78 /// std::string - Path of the directory to delete.
81 /// EFrameworkunifiedStatus - success or error
82 ////////////////////////////////////////////////////////////////////////////////////////////
83 static EFrameworkunifiedStatus CreateDirectory(const std::string &f_cdirpath);
85 ////////////////////////////////////////////////////////////////////////////////////////////
86 /// This method is used to verify directory.
88 /// \param [in] f_cpath
89 /// std::string - Path of the directory to delete.
92 /// EFrameworkunifiedStatus - success or error
93 ////////////////////////////////////////////////////////////////////////////////////////////
94 static BOOL IsDirectory(const std::string &f_cpath);
96 ////////////////////////////////////////////////////////////////////////////////////////////
97 /// This method is used to delete directory with delay of f_uidelay(msec)
98 /// between consecutive deletes.
100 /// \param [in] f_cpath
101 /// std::string - Path of the directory to delete.
102 /// \param [in] f_uidelay
103 /// UI_32 - delay in millisec before recursive call.
106 /// EFrameworkunifiedStatus - success or error
107 ////////////////////////////////////////////////////////////////////////////////////////////
108 static BOOL RemoveDirectory(std::string f_cpath, const UI_32 f_uidelay = 0);
111 #endif // NOTIFICATION_PERSISTENT_SERVICE_SERVER_INCLUDE_NS_NPP_FS_DIRECTORY_H_