harmony 鸿蒙@ohos.file.fileExtensionInfo (User File Extension Information)

  • 2022-12-05
  • 浏览 (558)

@ohos.file.fileExtensionInfo (User File Extension Information)

The fileExtensionInfo module defines attributes in RootInfo and FileInfo of the user file access and management module.

NOTE

  • The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
  • The APIs provided by this module are system APIs.

Modules to Import

import fileExtensionInfo from '@ohos.file.fileExtensionInfo';

fileExtensionInfo.DeviceType

Defines the values of deviceType used in RootInfo.

Model restriction: This API can be used only in the stage model.

System capability: SystemCapability.FileManagement.UserFileService

Name Value Description
DEVICE_LOCAL_DISK 1 Local disk.
DEVICE_SHARED_DISK 2 Shared disk.
DEVICE_SHARED_TERMINAL 3 Distributed network device.
DEVICE_NETWORK_NEIGHBORHOODS 4 Network neighbor device.
DEVICE_EXTERNAL_MTP 5 MTP device.
DEVICE_EXTERNAL_USB 6 USB device.
DEVICE_EXTERNAL_CLOUD 7 Cloud disk.

fileExtensionInfo.DeviceFlag

Defines the values of deviceFlags used in RootInfo. deviceFlags is used to determine whether a capability is available through the AND operation.

Model restriction: This API can be used only in the stage model.

System capability: SystemCapability.FileManagement.UserFileService

Attributes

Name Type Readable Writable Description
SUPPORTS_READ number Yes No The device supports read.
SUPPORTS_WRITE number Yes No The device supports write.

fileExtensionInfo.DocumentFlag

Defines the values of mode used in FileInfo.

Model restriction: This API can be used only in the stage model.

System capability: SystemCapability.FileManagement.UserFileService

Attributes

Name Type Readable Writable Description
REPRESENTS_FILE number Yes No File.
REPRESENTS_DIR number Yes No Directory.
SUPPORTS_READ number Yes No This file is readable.
SUPPORTS_WRITE number Yes No This file is writable.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙APIs

harmony 鸿蒙System Common Events (To Be Deprecated Soon)

harmony 鸿蒙System Common Events

harmony 鸿蒙API Reference Document Description

harmony 鸿蒙Enterprise Device Management Overview (for System Applications Only)

harmony 鸿蒙BundleStatusCallback

harmony 鸿蒙@ohos.bundle.innerBundleManager (innerBundleManager)

harmony 鸿蒙@ohos.distributedBundle (Distributed Bundle Management)

harmony 鸿蒙@ohos.bundle (Bundle)

harmony 鸿蒙@ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)

0  赞