codecamp

FileSystemManager.appendFileSync

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

暂未支持

FileSystemManager.appendFile 的同步版本


输入

filePath string

要追加内容的文件路径

data string|ArrayBuffer

要追加的文本或二进制数据

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 illegal operation on a directory, open "${filePath}"指定的 filePath 是一个已经存在的目录
fail permission denied, open ${dirPath}指定的 filePath 路径没有写权限
fail sdcard not mounted指定的 filePath 是一个已经存在的目录
FileSystemManager.appendFile
FileSystemManager.removeSavedFile
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

无标题目录

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题目录

无标题文章

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }