codecamp

微信小游戏开发文档-小游戏文件API string FileSystemManager.unlinkSync(string filePath)

string FileSystemManager.unlinkSync(string filePath)

FileSystemManager.unlink 的同步版本

参数

string filePath

要删除的文件路径

返回值

string errMsg

错误信息

errMsg 的合法值

说明
fail permission denied, open ${path} 指定的 path 路径没有读权限
fail no such file or directory ${path} 文件不存在
fail operation not permitted, unlink ${filePath} 传入的 filePath 是一个目录
微信小游戏开发文档-小游戏文件API FileSystemManager.unzip(Object object) 解压文件
微信小游戏开发文档-小游戏文件API FileSystemManager.unzipSync(string zipFilePath, string targetPath)
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

微信小游戏 API

微信小游戏API 系统

微信小游戏设备

微信小游戏API 文件

微信小游戏网络

微信小游戏API 界面

微信小游戏数据上报

关闭

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; }