小程序开放平台

文档中心
基础
转发
界面
网络
数据缓存
渲染
媒体
文件
getFileSystemManager
FileSystemManager
FileSystemManager方法
access
accessSync
copyFile
mkdirSync
readdir
rmdirSync
saveFile
saveFileSync
unlink
unzip
writeFile
writeFileSync
开放接口
设备
跳转
位置
支付

xhs.saveFileSync

开发
>
JS API
>
文件
>
FileSystemManager方法
>
saveFileSync
>
更新时间:2024-11-14 11:47:48

以 Promise 风格 调用:不支持

功能描述

FileSystemManager.saveFile 的同步版本

参数

string tempFilePath

临时存储文件路径 (本地路径)

string filePath

要存储的文件路径 (本地路径)

返回值

string savedFilePath

存储后的文件路径 (本地路径)