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

2022-12-05 浏览 (715)

@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

NameValueDescription
DEVICE_LOCAL_DISK1Local disk.
DEVICE_SHARED_DISK2Shared disk.
DEVICE_SHARED_TERMINAL3Distributed network device.
DEVICE_NETWORK_NEIGHBORHOODS4Network neighbor device.
DEVICE_EXTERNAL_MTP5MTP device.
DEVICE_EXTERNAL_USB6USB device.
DEVICE_EXTERNAL_CLOUD7Cloud 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

NameTypeReadableWritableDescription
SUPPORTS_READnumberYesNoThe device supports read.
SUPPORTS_WRITEnumberYesNoThe 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

NameTypeReadableWritableDescription
REPRESENTS_FILEnumberYesNoFile.
REPRESENTS_DIRnumberYesNoDirectory.
SUPPORTS_READnumberYesNoThis file is readable.
SUPPORTS_WRITEnumberYesNoThis 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)

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/90dd03e4b9e2443aa411cb5d337ac0f8