harmony 鸿蒙FileIO
FileIO
Overview
Provides capabilities of basic file operations.
Since: 12
Summary
Files
Name | Description |
---|---|
error_code.h | Defines the error codes for the FileIO module. |
oh_fileio.h | Defines the native APIs for basic file operations. |
Types
Name | Description |
---|---|
typedef enum FileManagement_ErrCode FileManagement_ErrCode | Defines an enum for the error codes used in the FileIO module. |
typedef enum FileIO_FileLocation FileIO_FileLocation | Defines an enum for file locations. |
Enums
Name | Description |
---|---|
FileManagement_ErrCode { ERR_OK = 0, ERR_PERMISSION_ERROR = 201, ERR_INVALID_PARAMETER = 401, ERR_DEVICE_NOT_SUPPORTED = 801, ERR_EPERM = 13900001, ERR_ENOENT = 13900002, ERR_ENOMEM = 13900011, ERR_UNKNOWN = 13900042 } |
Enumerates the error codes used in the FileIO module. |
FileIO_FileLocation { LOCAL = 1, CLOUD = 2, LOCAL_AND_CLOUD = 3 } |
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. |
Type Description
FileIO_FileLocation
typedef enum FileIO_FileLocation FileIO_FileLocation
Description
Defines an enum for file locations.
Since: 12
FileManagement_ErrCode
typedef enum FileManagement_ErrCode FileManagement_ErrCode
Description
Defines an enum for the error codes used in the FileIO module.
Since: 12
Enum Description
FileIO_FileLocation
enum FileIO_FileLocation
Description
Enumerates the file locations.
Since: 12
Value | Description |
---|---|
LOCAL | The file is stored in a local device. |
CLOUD | The file is stored in the cloud. |
LOCAL_AND_CLOUD | The file is stored in a local device and in the cloud. |
FileManagement_ErrCode
enum FileManagement_ErrCode
Description
Enumerates the error codes used in the FileIO module.
Since: 12
Value | Description |
---|---|
ERR_OK | The API is called successfully. |
ERR_PERMISSION_ERROR | The permission verification of the caller fails. |
ERR_INVALID_PARAMETER | Invalid parameter. |
ERR_DEVICE_NOT_SUPPORTED | The device does not support this interface. |
ERR_EPERM | The operation is not allowed. |
ERR_ENOENT | The file or folder does not exist. |
ERR_ENOMEM | A memory overflow occurs. |
ERR_UNKNOWN | Internal unknown error. |
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 |
---|---|
uri | Pointer to the URI of the file. |
uriLength | Length of the URI. |
location | Pointer to the location of the file obtained. |
Returns
Returns FileManagement_ErrCode.
你可能感兴趣的鸿蒙文章
harmony 鸿蒙FileShare_PolicyErrorResult
harmony 鸿蒙FileShare_PolicyInfo
harmony 鸿蒙File Management Error Codes
harmony 鸿蒙@ohos.application.BackupExtensionAbility (BackupExtensionAbility)
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦