harmony 鸿蒙@ohos.file.picker (Picker) (System API)
@ohos.file.picker (Picker) (System API)
The Picker module encapsulates APIs such as PhotoViewPicker, DocumentViewPicker, and AudioViewPicker to provide capabilities of selecting and saving files of different types. An application can select the API as required. The APIs of this module must be called in UIAbility. Otherwise, the photoPicker or FilePicker cannot be started. > NOTE > > - The initial APIs of this module are supported since API version 9. Updates will be marked with a superscript to indicate their earliest API version. > - This topic describes only the system APIs provided by the module. For details about its public APIs, see @ohos.file.picker (Picker).
Modules to Import
import { picker } from '@kit.CoreFileKit';
DocumentSelectOptions
Defines the options for selecting documents.
Atomic service API: This API can be used in atomic services since API version 12.
System capability: SystemCapability.FileManagement.UserFileService
Properties
Name | Type | Read-Only | Optional | Description |
---|---|---|---|---|
themeColor18+ | CustomColors | No | Yes | Theme color parameter. By default, it is left empty and follows the color settings of the FilePicker. When it is set to specific theme color properties, such as brand, fontPrimary, compBackgroundEmphasize, and iconFourth, the launched FilePicker will adapt to the theme color accordingly. System capability: SystemCapability.FileManagement.UserFileService. Only mobile phones are supported. |
DocumentSaveOptions
Defines the options for saving documents.
Atomic service API: This API can be used in atomic services since API version 12.
System capability: SystemCapability.FileManagement.UserFileService
Properties
Name | Type | Read-Only | Optional | Description |
---|---|---|---|---|
themeColor18+ | CustomColors | No | Yes | Theme color parameter. By default, it is left empty and follows the color settings of the FilePicker. When it is set to specific theme color properties, such as fontEmphasize and compBackgroundEmphasize, the launched FilePicker will adapt to the theme color accordingly. System capability: SystemCapability.FileManagement.UserFileService. Only mobile phones are supported. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙FileShare_PolicyErrorResult
harmony 鸿蒙FileShare_PolicyInfo
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦