1/* 2 * Copyright (c) 2022 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/** 17 * This module provides the capability to parse file or device information. 18 * 19 * @since 9 20 * @syscap SystemCapability.FileManagement.UserFileService 21 * @systemapi 22 */ 23declare namespace fileExtensionInfo { 24 /** 25 * DeviceType Indicates the type of device connected to the fileaccess server. 26 * @since 9 27 * @syscap SystemCapability.FileManagement.UserFileService 28 * @systemapi 29 * @StageModelOnly 30 */ 31 enum DeviceType { 32 DEVICE_LOCAL_DISK = 1, // Local c,d... disk 33 DEVICE_SHARED_DISK, // Multi-user shared disk 34 DEVICE_SHARED_TERMINAL, // Distributed networking terminal device 35 DEVICE_NETWORK_NEIGHBORHOODS, // Network neighbor device 36 DEVICE_EXTERNAL_MTP, // MTP device 37 DEVICE_EXTERNAL_USB, // USB device 38 DEVICE_EXTERNAL_CLOUD // Cloud disk device 39 } 40 41 /** 42 * Indicates the supported capabilities of the device. 43 * @since 9 44 * @syscap SystemCapability.FileManagement.UserFileService 45 * @systemapi 46 * @StageModelOnly 47 */ 48 namespace DeviceFlag { 49 const SUPPORTS_READ = 0b1; 50 const SUPPORTS_WRITE = 0b10; 51 } 52 53 /** 54 * Indicate the supported capabilities of the file or directory. 55 * @since 9 56 * @syscap SystemCapability.FileManagement.UserFileService 57 * @systemapi 58 * @StageModelOnly 59 */ 60 namespace DocumentFlag { 61 const REPRESENTS_FILE = 0b1; 62 const REPRESENTS_DIR = 0b10; 63 const SUPPORTS_READ = 0b100; 64 const SUPPORTS_WRITE = 0b1000; 65 } 66} 67 68export default fileExtensionInfo; 69