oh_fileio.h
Overview
Defines the native APIs used to obtain the location of a file.
File to include: <filemanagement/fileio/oh_fileio.h>
Library: libohfileio.so
System capability: SystemCapability.FileManagement.File.FileIO
Since: 12
Related module: FileIO
Summary
Enums
| Name | typedef Keyword | Description |
|---|---|---|
| FileIO_FileLocation | FileIO_FileLocation | Enumerates the file locations. |
Functions
| Name | Description |
|---|---|
| FileManagement_ErrCode OH_FileIO_GetFileLocation(char *uri, int uriLength, FileIO_FileLocation *location) | Obtains the location of a file. |
Enum Description
FileIO_FileLocation
enum FileIO_FileLocation
Description
Enumerates the file locations.
Since: 12
| Enum Item | Description |
|---|---|
| LOCAL = 1 | The file is stored on the local device. |
| CLOUD = 2 | The file is stored on the cloud. |
| LOCAL_AND_CLOUD = 3 | The file is stored on the local device and cloud. |
Function Description
OH_FileIO_GetFileLocation()
FileManagement_ErrCode OH_FileIO_GetFileLocation(char *uri, int uriLength, FileIO_FileLocation *location)
Description
Obtains the location of a file.
Since: 12
Parameters
| Name | Description |
|---|---|
| char *uri | Pointer to the URI of the file. |
| int uriLength | Length of the URI. |
| FileIO_FileLocation *location | Pointer to the location of the file obtained. |
Returns
| Type | Description |
|---|---|
| FileManagement_ErrCode | Returns FileManagement_ErrCode. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 js-apis-file-environment-sys
openharmony 鸿蒙 js-apis-file-fs
openharmony 鸿蒙 capi-clouddisk-clouddisk-pathinfo
openharmony 鸿蒙 capi-clouddisk-clouddisk-changesresult
openharmony 鸿蒙 capi-clouddisk-clouddisk-syncfolder
openharmony 鸿蒙 js-apis-fileShare
openharmony 鸿蒙 js-apis-file-storage-statistics-sys