1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef FILEMANAGEMENT_FILE_API_DISCONNECTDFS_H 17 #define FILEMANAGEMENT_FILE_API_DISCONNECTDFS_H 18 19 #include "bundle_mgr_client_impl.h" 20 #include <chrono> 21 #include "common_func.h" 22 #include "filemgmt_libn.h" 23 #include "n_async/n_ref.h" 24 #include <set> 25 #include <sys/inotify.h> 26 #include <thread> 27 28 namespace OHOS { 29 namespace FileManagement { 30 namespace ModuleFileIO { 31 using namespace std; 32 using namespace OHOS::FileManagement::LibN; 33 using namespace OHOS::AppExecFwk; 34 const std::string PROCEDURE_DISCONNECTDFS_NAME = "FileFSDisconnectDfs"; 35 36 class DisconnectDfs final { 37 public: 38 static napi_value Async(napi_env env, napi_callback_info info); 39 40 private: 41 // operator of napi 42 static tuple<bool, std::string> ParseJsOperand(napi_env env, NVal paramFromJsArg); 43 }; 44 45 } // namespace ModuleFileIO 46 } // namespace FileManagement 47 } // namespace OHOS 48 49 #endif // FILEMANAGEMENT_FILE_API_DISCONNECTDFS_H