FileSystemManager.writeFileSync

2020-02-14 14:08 更新

FileSystemManager.writeFileSync(string filePath, string|ArrayBuffer data, string encoding)

FileSystemManager.writeFile 的同步版本


輸入

filePath string

要寫入的文件路徑

data string|ArrayBuffer

要寫入的文本或二進(jìn)制數(shù)據(jù)

encoding string

指定寫入文件的字符編碼

說明
ascii
base64
binary
hex
ucs2/ucs-2/utf16le/utf-16le以小端序讀取
utf-8/utf8

latin1


錯誤

errMsg說明
fail no such file or directory, open ${filePath}指定的 filePath 所在目錄不存在
fail permission denied, open ${dirPath}指定的 filePath 路徑?jīng)]有寫權(quán)限
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號