字節(jié)跳動(dòng)小程序開(kāi)發(fā)API FileSystemManager.saveFile

2019-08-27 16:55 更新

FileSystemManager.saveFile(Object object)

保存臨時(shí)文件到本地。此接口會(huì)移動(dòng)臨時(shí)文件,因此調(diào)用成功后,tempFilePath 將不可用。 本地文件存儲(chǔ)上限:10M。

輸入


繼承標(biāo)準(zhǔn)對(duì)象輸入,擴(kuò)展屬性描述:

屬性 類型 默認(rèn)值 是否必填 說(shuō)明
tempFilePath string 臨時(shí)存儲(chǔ)文件路徑
filePath string 要存儲(chǔ)的文件路徑

輸出


success 回調(diào)函數(shù)參數(shù) Object

屬性 類型 說(shuō)明
savedFilePath number 存儲(chǔ)后的文件路徑

fail 回調(diào)函數(shù)參數(shù) Object

屬性 類型 說(shuō)明
errMsg string 錯(cuò)誤信息
說(shuō)明
fail tempFilePath file not exist 指定的 tempFilePath 找不到文件
fail permission denied, open "${filePath}" 指定的 filePath 路徑?jīng)]有寫權(quán)限
fail no such file or directory "${dirPath}" 上級(jí)目錄不存在


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)