1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15BASE_DIR = "//foundation/filemanagement/user_file_service" 16 17ohos_shared_library("fileaccess") { 18 subsystem_name = "filemanagement" 19 part_name = "user_file_service" 20 21 relative_install_dir = "module/file" 22 23 include_dirs = [ 24 "./", 25 "${BASE_DIR}/interfaces/kits/napi/common", 26 "${BASE_DIR}/interfaces/kits/napi/file_access_module/file_info", 27 "${BASE_DIR}/interfaces/kits/napi/file_access_module/root_info", 28 "${BASE_DIR}/utils", 29 "//foundation/filemanagement/file_api/interfaces/kits/js/src/common", 30 "//foundation/filemanagement/file_api/utils/filemgmt_libn/include", 31 ] 32 33 sources = [ 34 "${BASE_DIR}/interfaces/kits/napi/common/file_extension_info_napi.cpp", 35 "file_info/napi_file_info_exporter.cpp", 36 "file_info/napi_file_iterator_exporter.cpp", 37 "napi_fileaccess_helper.cpp", 38 "napi_notify_callback.cpp", 39 "napi_utils.cpp", 40 "native_fileaccess_module.cpp", 41 "root_info/napi_root_info_exporter.cpp", 42 "root_info/napi_root_iterator_exporter.cpp", 43 ] 44 45 deps = [ 46 "${BASE_DIR}/frameworks/innerkits/file_access:file_access_extension_ability_kit", 47 "//foundation/ability/ability_runtime/frameworks/js/napi/inner/napi_common:napi_common", 48 "//foundation/filemanagement/file_api/utils/filemgmt_libn:filemgmt_libn", 49 ] 50 51 external_deps = [ 52 "ability_base:want", 53 "ability_base:zuri", 54 "ability_runtime:abilitykit_native", 55 "ability_runtime:napi_base_context", 56 "c_utils:utils", 57 "hiviewdfx_hilog_native:libhilog", 58 "napi:ace_napi", 59 ] 60} 61