未验证 提交 ef932165 编写于 作者: O openharmony_ci 提交者: Gitee

!17496 [翻译完成】#I6T7LZ

Merge pull request !17496 from Annie_wang/PR16880
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
- [@ohos.file.environment (Directory Environment Capability)](js-apis-file-environment.md) - [@ohos.file.environment (Directory Environment Capability)](js-apis-file-environment.md)
- [@ohos.file.fileAccess (User File Access and Management)](js-apis-fileAccess.md) - [@ohos.file.fileAccess (User File Access and Management)](js-apis-fileAccess.md)
- [@ohos.file.fileExtensionInfo (User File Extension Information)](js-apis-fileExtensionInfo.md) - [@ohos.file.fileExtensionInfo (User File Extension Information)](js-apis-fileExtensionInfo.md)
- [@ohos.file.fileUri (File URI)](js-apis-file-fileUri.md) - [@ohos.file.fileuri (File URI)](js-apis-file-fileuri.md)
- [@ohos.file.fs (File Management)](js-apis-file-fs.md) - [@ohos.file.fs (File Management)](js-apis-file-fs.md)
- [@ohos.file.hash (File Hash Processing)](js-apis-file-hash.md) - [@ohos.file.hash (File Hash Processing)](js-apis-file-hash.md)
- [@ohos.file.picker (Picker)](js-apis-file-picker.md) - [@ohos.file.picker (Picker)](js-apis-file-picker.md)
......
# @ohos.file.fileUri (File URI) # @ohos.file.fileuri (File URI)
The **fileUri** module allows the uniform resource identifier (URI) of a file to be obtained based on the file path. With the file URI, you can use the APIs provided by [@ohos.file.fs](js-apis-file-fs.md) to operate the file. The **fileUri** module allows the uniform resource identifier (URI) of a file to be obtained based on the file path. With the file URI, you can use the APIs provided by [@ohos.file.fs](js-apis-file-fs.md) to operate the file.
...@@ -9,7 +9,7 @@ The **fileUri** module allows the uniform resource identifier (URI) of a file to ...@@ -9,7 +9,7 @@ The **fileUri** module allows the uniform resource identifier (URI) of a file to
## Modules to Import ## Modules to Import
```js ```js
import fileUri from "@ohos.file.fileUri"; import fileuri from "@ohos.file.fileuri";
``` ```
Before using this module, you need to obtain the path of the file in the application sandbox. The following is an example: Before using this module, you need to obtain the path of the file in the application sandbox. The following is an example:
...@@ -57,5 +57,5 @@ For details about the error codes, see [File Management Error Codes](../errorcod ...@@ -57,5 +57,5 @@ For details about the error codes, see [File Management Error Codes](../errorcod
```js ```js
let filePath = pathDir + "test.txt"; let filePath = pathDir + "test.txt";
let uri = fileUri.getUriFromPath(filePath); let uri = fileuri.getUriFromPath(filePath);
``` ```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册