openharmony 鸿蒙 capi-oh-fileio-h

2026-08-25 浏览 (1)

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

Nametypedef KeywordDescription
FileIO_FileLocationFileIO_FileLocationEnumerates the file locations.

Functions

NameDescription
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 ItemDescription
LOCAL = 1The file is stored on the local device.
CLOUD = 2The file is stored on the cloud.
LOCAL_AND_CLOUD = 3The 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

NameDescription
char *uriPointer to the URI of the file.
int uriLengthLength of the URI.
FileIO_FileLocation *locationPointer to the location of the file obtained.

Returns

TypeDescription
FileManagement_ErrCodeReturns 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 鸿蒙 capi-fileio

openharmony 鸿蒙 js-apis-file-storage-statistics-sys

openharmony 鸿蒙 js-apis-file-cloudsyncmanager

openharmony 鸿蒙 js-apis-file-environment

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