小程序中文件相关api总结

简介:

wx.saveFile(OBJECT)

保存文件到本地。注意:saveFile 会把临时文件移动,因此调用成功后传入的 tempFilePath 将不可用

OBJECT参数说明:

参数名 类型 必填 说明
count Number 最多可以选择的图片张数,默认9
sizeType StringArray original 原图,compressed 压缩图,默认二者都有
sourceType StringArray album 从相册选图,camera 使用相机,默认二者都有
success Function 成功则返回图片的本地文件路径列表 tempFilePaths
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

success返回参数说明:

参数 说明
savedFilePath 文件的保存路径
wx.chooseImage({
  success: function(res) {
    var tempFilePaths = res.tempFilePaths
    wx.saveFile({
      tempFilePath: tempFilePaths[0],
      success: function(res) {
        var savedFilePath = res.savedFilePath
      }
    })
  }
})

tip: 本地文件存储的大小限制为 10M

wx.getSavedFileList(OBJECT)

获取本地已保存的文件列表

参数名 类型 必填 说明
success Function 接口调用成功的回调函数,返回结果见success返回参数说明
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

success返回参数说明:

参数 类型 说明
errMsg String 接口调用结果
fileList Object Array 文件列表

fileList中的项目说明:

类型 说明
filePath String 文件的本地路径
createTime Number 文件的保存时的时间戳,从1970/01/01 08:00:00 到当前时间的秒数
size Number 文件大小,单位B
wx.getSavedFileList({
  success: function(res) {
    console.log(res.fileList)
  }
})

wx.getSavedFileInfo(OBJECT)

获取本地文件的文件信息。此接口只能用于获取已保存到本地的文件,若需要获取临时文件信息,请使用 wx.getFileInfo 接口

OBJECT参数说明:

参数名 类型 必填 说明
filePath String 文件路径
success Function 接口调用成功的回调函数,返回结果见success返回参数说明
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

success返回参数说明:

参数 类型 说明
errMsg String 接口调用结果
size Number 文件大小,单位B
createTime Number 文件保存时的时间戳,从1970/01/01 08:00:00 到该时刻的秒数
wx.getSavedFileInfo({
  filePath: 'wxfile://somefile', //仅做示例用,非真正的文件路径
  success: function(res) {
    console.log(res.size)
    console.log(res.createTime)
  }
})

wx.removeSavedFile(OBJECT)

删除本地存储的文件

OBJECT参数说明:

参数名 类型 必填 说明
filePath String 需要删除的文件路径
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)
wx.getSavedFileList({
  success: function(res) {
    if (res.fileList.length > 0){
      wx.removeSavedFile({
        filePath: res.fileList[0].filePath,
        complete: function(res) {
          console.log(res)
        }
      })
    }
  }
})

wx.openDocument(OBJECT)

新开页面打开文档,支持格式:doc, xls, ppt, pdf, docx, xlsx, pptx

OBJECT参数说明:

参数名 类型 必填 说明 最低版本
filePath String 文件路径,可通过 downFile 获得
fileType String 文件类型,指定文件类型打开文件,有效值 doc, xls, ppt, pdf, docx, xlsx, pptx 1.4.0
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)
wx.downloadFile({
  url: 'http://example.com/somefile.pdf',
  success: function (res) {
    var filePath = res.tempFilePath
    wx.openDocument({
      filePath: filePath,
      success: function (res) {
        console.log('打开文档成功')
      }
    })
  }
})

文件管理器

FileSystemManager:文件管理器。基础库 1.9.9 开始支持,低版本需做兼容处理

方法

FileSystemManager.access(Object object):判断文件/目录是否存在

FileSystemManager.appendFile(Object object):在文件结尾追加内容

FileSystemManager.saveFile(Object object):保存临时文件到本地。此接口会移动临时文件,因此调用成功后,tempFilePath 将不可用。

FileSystemManager.getSavedFileList():获取该小程序下已保存的本地缓存文件列表

FileSystemManager.removeSavedFile(Object object):删除该小程序下已保存的本地缓存文件

FileSystemManager.copyFile(Object object):复制文件

FileSystemManager.getFileInfo(Object object):获取该小程序下的 本地临时文件 或 本地缓存文件 信息

FileSystemManager.mkdir(Object object):创建目录

FileSystemManager.readdir(Object object):读取目录内文件列表

FileSystemManager.readFile(Object object):读取本地文件内容

FileSystemManager.rename(Object object):重命名文件,可以把文件从 oldPath 移动到 newPath

FileSystemManager.rmdir(Object object):删除目录

Stats FileSystemManager.stat(Object object):获取文件 Stats 对象

FileSystemManager.unlink(Object object):删除文件

FileSystemManager.unzip(Object object):解压文件

FileSystemManager.writeFile(Object object):写文件

FileSystemManager wx.getFileSystemManager()

获取全局唯一的文件管理器。基础库 1.9.9 开始支持,低版本需做兼容处理

返回值

FileSystemManager:文件管理器

FileSystemManager.appendFile(Object object)

在文件结尾追加内容。基础库 2.1.0 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
filePath String 要追加内容的文件路径
data string/ArrayBuffer 要追加的文本或二进制数据
encoding string utf8 要追加的文本或二进制数据
success Function 指定写入文件的字符编码
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

object.encoding 的合法值

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

fail 回调函数

属性 类型 说明 支持版本
errMsg String 错误信息

res.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.access(Object object)

判断文件/目录是否存在。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
path string 要判断是否存在的文件/目录路径
success Function 指定写入文件的字符编码
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

fail 回调函数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail no such file or directory ${path} 文件/目录不存在

FileSystemManager.accessSync(string path)

FileSystemManager.access 的同步版本。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

string path:要判断是否存在的文件/目录路径

错误

errMsg 说明
fail no such file or directory ${path} 文件/目录不存在

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

FileSystemManager.appendFile 的同步版本。基础库 2.1.0 开始支持,低版本需做兼容处理

参数

string filePath:要追加内容的文件路径

string|ArrayBuffer data:要追加的文本或二进制数据

string encoding:指定写入文件的字符编码

encoding 的合法值

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

错误

errMsg 说明
fail no such file or directory ${path} 文件/目录不存在
fail illegal operation on a directory, open "${filePath}" 指定的 filePath 是一个已经存在的目录
fail permission denied, open ${dirPath} 指定的 filePath 路径没有写权限
fail sdcard not mounted 指定的 filePath 是一个已经存在的目录

FileSystemManager.copyFile(Object object)

复制文件。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
srcPath string 源文件路径,只可以是普通文件
destPath string 目标文件路径
success Function 指定写入文件的字符编码
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

fail 回调函数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail permission denied, copyFile ${srcPath} -> ${destPath} 指定目标文件路径没有写权限
fail no such file or directory, copyFile ${srcPath} -> ${destPath} 源文件不存在,或目标文件路径的上层目录不存在

FileSystemManager.copyFileSync(string srcPath, string destPath)

FileSystemManager.copyFile 的同步版本。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

string srcPath:源文件路径,只可以是普通文件

string destPath:目标文件路径

错误

errMsg 说明
fail permission denied, copyFile ${srcPath} -> ${destPath} 指定目标文件路径没有写权限
fail no such file or directory, copyFile ${srcPath} -> ${destPath} 源文件不存在,或目标文件路径的上层目录不存在

FileSystemManager.getSavedFileList(Object object)

获取该小程序下已保存的本地缓存文件列表。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
success Function 指定写入文件的字符编码
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

success 回调函数

参数

属性 类型 说明 支持版本
fileList Object 文件数组,每一项是一个 FileItem

res.fileList 的结构

属性 类型 说明 支持版本
filePath string 本地路径
size number 本地文件大小,以字节为单位
createTime number 文件创建时间

FileSystemManager.getFileInfo(Object object)

获取该小程序下的 本地临时文件 或 本地缓存文件 信息。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
filePath string 要读取的文件路径
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

success 回调函数

属性 类型 说明 支持版本
size number 文件大小,以字节为单位

fail 回调函数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail file not exist 指定的 filePath 找不到文件

FileSystemManager.mkdir(Object object)

创建目录。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
dirPath string 创建的目录路径
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

fail 回调函数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail no such file or directory ${dirPath} 上级目录不存在
fail permission denied, open ${dirPath} 指定的 filePath 路径没有写权限
fail file already exists ${dirPath} 有同名文件或目录

FileSystemManager.mkdirSync(string dirPath)

FileSystemManager.mkdir 的同步版本。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

string dirPath:创建的目录路径

错误

errMsg 说明
fail no such file or directory ${dirPath} 上级目录不存在
fail permission denied, open ${dirPath} 指定的 filePath 路径没有写权限
fail file already exists ${dirPath} 有同名文件或目录

FileSystemManager.removeSavedFile(Object object)

删除该小程序下已保存的本地缓存文件。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
filePath string 需要删除的文件路径
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

fail 回调函数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
(fail file not exist) 指定的 tempFilePath 找不到文件

string|ArrayBuffer FileSystemManager.readFileSync(string filePath, string encoding)

FileSystemManager.readFile 的同步版本。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

string filePath:要读取的文件的路径

string encoding:指定读取文件的字符编码,如果不传 encoding,则以 ArrayBuffer 格式读取文件的二进制内容

encoding 的合法值

说明
ascii
base64
binary
hex
ucs2/ucs-2/utf16le/utf-16le 以小程序读取
utf-8/utf8
latin1

返回值

string|ArrayBuffer data:文件内容

错误

errMsg 说明
fail no such file or directory, open ${filePath} 指定的 filePath 所在目录不存在
fail permission denied, open ${dirPath} 指定的 filePath 路径没有读权限

FileSystemManager.renameSync(string oldPath, string newPath)

FileSystemManager.rename 的同步版本。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

string oldPath:源文件路径,可以是普通文件或目录

string newPath:新文件路径

错误

errMsg 说明
fail permission denied, rename ${oldPath} -> ${newPath} 指定源文件或目标文件没有写权限
fail no such file or directory, rename ${oldPath} -> ${newPath} 源文件不存在,或目标文件路径的上层目录不存在

FileSystemManager.rmdirSync(string dirPath)

FileSystemManager.rmdir 的同步版本。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

string dirPath:要删除的目录路径

错误

errMsg 说明
fail no such file or directory ${dirPath} 目录不存在
fail directory not empty 目录不为空
fail permission denied, open ${dirPath} 指定的 dirPath 路径没有写权限

FileSystemManager.readdir(Object object)

读取目录内文件列表。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
dirPath string 要读取的目录路径
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

success 回调函数

属性 类型 说明 支持版本
files Array. 指定目录下的文件名数组

fail 回调函数

参数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail no such file or directory ${dirPath} 目录不存在
fail not a directory ${dirPath} dirPath 不是目录
fail permission denied, open ${dirPath} 指定的 dirPath 路径没有写权限

FileSystemManager.rename(Object object)

重命名文件,可以把文件从 oldPath 移动到 newPath。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
oldPath string 源文件路径,可以是普通文件或目录
newPath string 新文件路径
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

fail 回调函数

参数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail permission denied, rename ${oldPath} -> ${newPath} 指定源文件或目标文件没有写权限
fail no such file or directory, rename ${oldPath} -> ${newPath} 源文件不存在,或目标文件路径的上层目录不存在

FileSystemManager.readFile(Object object)

读取本地文件内容。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
filePath string 要读取的文件的路径
encoding string 指定读取文件的字符编码,如果不传 encoding,则以 ArrayBuffer 格式读取文件的二进制内容
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

object.encoding 的合法值

说明
ascii
base64
binary
hex
ucs2/ucs-2/utf16le/utf-16le 以小程序读取
utf-8/utf8
latin1

success 回调函数

参数

属性 类型 说明 支持版本
data string/ArrayBuffer 文件内容

fail 回调函数

参数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail no such file or directory, open ${filePath} 指定的 filePath 所在目录不存在
fail permission denied, open ${dirPath} 指定的 filePath 路径没有读权限

FileSystemManager.rmdir(Object object)

删除目录。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
dirPath string 要删除的目录路径
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

fail 回调函数

参数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail no such file or directory ${dirPath} 目录不存在
fail directory not empty 目录不为空
fail permission denied, open ${dirPath} 指定的 filePath 路径没有读权限

Array. FileSystemManager.readdirSync(string dirPath)

FileSystemManager.readdir 的同步版本。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

string dirPath:要读取的目录路径

返回值

Array. files:指定目录下的文件名数组

错误

errMsg 说明
fail no such file or directory ${dirPath} 目录不存在
fail not a directory ${dirPath} dirPath 不是目录
fail permission denied, open ${dirPath} 指定的 dirPath 路径没有写权限

FileSystemManager.saveFile(Object object)

保存临时文件到本地。此接口会移动临时文件,因此调用成功后,tempFilePath 将不可用。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
tempFilePath string 临时存储文件路径
filePath string 要存储的文件路径
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

success 回调函数

属性 类型 说明 支持版本
savedFilePath number 存储后的文件路径

fail 回调函数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail tempFilePath file not exist 指定的 tempFilePath 找不到文件
fail permission denied, open "${filePath}" 指定的 filePath 路径没有写权限
fail no such file or directory "${dirPath}" 上级目录不存在

number FileSystemManager.saveFileSync(string tempFilePath, string filePath)

FileSystemManager.saveFile 的同步版本。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

string tempFilePath:临时存储文件路径

string filePath:要存储的文件路径

返回值

number savedFilePath:存储后的文件路径

错误

errMsg 说明
fail tempFilePath file not exist 指定的 tempFilePath 找不到文件
fail permission denied, open "${filePath}" 指定的 filePath 路径没有写权限
fail no such file or directory "${dirPath}" 上级目录不存在

Stats FileSystemManager.stat(Object object)

获取文件 Stats 对象。基础库 1.9.9 开始支持,低版本需做兼容处理

属性 类型 默认值 必填 说明 支持版本
path string 文件/目录路径
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

success 回调函数

属性 类型 说明 支持版本
stat Stats 一个 Stats 对象

fail 回调函数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail permission denied, open ${path} 指定的 path 路径没有读权限
fail no such file or directory ${path} 文件不存在

返回值

Stats

Stats FileSystemManager.statSync(string path)

FileSystemManager.stat 的同步版本。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

string path:文件/目录路径

返回值

Stats stat:一个 Stats 对象

错误

errMsg 说明
fail permission denied, open ${path} 指定的 path 路径没有读权限
fail no such file or directory ${path} 文件不存在

Stats

描述文件状态的对象。基础库 1.9.9 开始支持,低版本需做兼容处理

属性

string mode:文件的类型和存取的权限,对应 POSIX stat.st_mode

number size:文件大小,单位:B,对应 POSIX stat.st_size

number lastAccessedTime:文件最近一次被存取或被执行的时间,UNIX 时间戳,对应 POSIX stat.st_atime

number lastModifiedTime:文件最后一次被修改的时间,UNIX 时间戳,对应 POSIX stat.st_mtime

方法

boolean Stats.isDirectory():判断当前文件是否一个目录

boolean Stats.isFile():判断当前文件是否一个普通文件

boolean Stats.isDirectory()

判断当前文件是否一个目录。基础库 1.9.9 开始支持,低版本需做兼容处理

返回值

boolean:表示当前文件是否一个目录

boolean Stats.isFile()

判断当前文件是否一个普通文件。基础库 1.9.9 开始支持,低版本需做兼容处理

返回值

boolean:表示当前文件是否一个普通文件

FileSystemManager.unlink(Object object)

删除文件。基础库 1.9.9 开始支持,低版本需做兼容处理。

参数

属性 类型 默认值 必填 说明 支持版本
filePath string 要删除的文件路径
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

fail 回调函数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail permission denied, open ${path} 指定的 path 路径没有读权限
fail no such file or directory ${path} 文件不存在
fail operation not permitted, unlink ${filePath} 传入的 filePath 是一个目录

FileSystemManager.unzip(Object object)

解压文件。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
zipFilePath string 源文件路径,只可以是 zip 压缩文件
targetPath string 目标目录路径
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

fail 回调函数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail permission denied, unzip ${zipFilePath} -> ${destPath} 指定目标文件路径没有写权限
fail no such file or directory, unzip ${zipFilePath} -> "${destPath} 源文件不存在,或目标文件路径的上层目录不存在

FileSystemManager.unlinkSync(string filePath)

FileSystemManager.unlink 的同步版本。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

string filePath:要删除的文件路径

错误

errMsg 说明
fail permission denied, open ${path} 指定的 path 路径没有读权限
fail no such file or directory ${path} 文件不存在
fail operation not permitted, unlink ${filePath} 传入的 filePath 是一个目录

FileSystemManager.writeFile(Object object)

写文件。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

属性 类型 默认值 必填 说明 支持版本
filePath string 要写入的文件路径
data string/ArrayBuffer 要写入的文本或二进制数据
encoding string utf8 指定写入文件的字符编码
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

object.encoding 的合法值

说明
ascii
base64
binary
hex
ucs2/ucs-2/utf16le/utf-16le 以小程序读取
utf-8/utf8
latin1

fail 回调函数

属性 类型 说明 支持版本
errMsg string 错误信息

res.errMsg 的合法值

说明
fail no such file or directory, open ${filePath} 指定的 filePath 所在目录不存在
fail permission denied, open ${dirPath} 指定的 filePath 路径没有写权限

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

FileSystemManager.writeFile 的同步版本。基础库 1.9.9 开始支持,低版本需做兼容处理

参数

string filePath:要写入的文件路径

string|ArrayBuffer data:要写入的文本或二进制数据

string encoding:指定写入文件的字符编码

encoding 的合法值

说明
ascii
base64
binary
hex
ucs2/ucs-2/utf16le/utf-16le 以小程序读取
utf-8/utf8
latin1

错误

说明
fail no such file or directory, open ${filePath} 指定的 filePath 所在目录不存在
fail permission denied, open ${dirPath} 指定的 filePath 路径没有写权限
目录
相关文章
|
1月前
|
前端开发 小程序 API
【微信小程序】-- 使用 npm 包 - API Promise化(四十二)
【微信小程序】-- 使用 npm 包 - API Promise化(四十二)
|
1月前
|
小程序 前端开发 数据可视化
微信小程序云开发入门教程-全局文件介绍
微信小程序云开发入门教程-全局文件介绍
|
2月前
|
存储 开发框架 小程序
社区每周丨小程序 CLI 1.8.10 版本上线及基础API新增接口(7.3-7.7)
社区每周丨小程序 CLI 1.8.10 版本上线及基础API新增接口(7.3-7.7)
43 0
|
11天前
|
小程序 前端开发 API
小程序全栈开发中的RESTful API设计
【4月更文挑战第12天】本文探讨了小程序全栈开发中的RESTful API设计,旨在帮助开发者理解和掌握相关技术。RESTful API基于REST架构风格,利用HTTP协议进行数据交互,遵循URI、客户端-服务器架构、无状态通信、标准HTTP方法和资源表述等原则。在小程序开发中,通过资源建模、设计API接口、定义资源表述及实现接口,实现前后端高效分离,提升开发效率和代码质量。小程序前端利用微信API与后端交互,确保数据流通。掌握这些实践将优化小程序全栈开发。
|
30天前
|
Java 数据库连接 API
Java 学习路线:基础知识、数据类型、条件语句、函数、循环、异常处理、数据结构、面向对象编程、包、文件和 API
Java 是一种广泛使用的、面向对象的编程语言,始于1995年,以其跨平台性、安全性和可靠性著称,应用于从移动设备到数据中心的各种场景。基础概念包括变量(如局部、实例和静态变量)、数据类型(原始和非原始)、条件语句(if、else、switch等)、函数、循环、异常处理、数据结构(如数组、链表)和面向对象编程(类、接口、继承等)。深入学习还包括包、内存管理、集合框架、序列化、网络套接字、泛型、流、JVM、垃圾回收和线程。构建工具如Gradle、Maven和Ant简化了开发流程,Web框架如Spring和Spring Boot支持Web应用开发。ORM工具如JPA、Hibernate处理对象与数
92 3
|
1月前
|
分布式计算 DataWorks 大数据
DataWorks常见问题之使用API删除之前的部署文件失败如何解决
DataWorks是阿里云提供的一站式大数据开发与管理平台,支持数据集成、数据开发、数据治理等功能;在本汇总中,我们梳理了DataWorks产品在使用过程中经常遇到的问题及解答,以助用户在数据处理和分析工作中提高效率,降低难度。
|
2月前
|
小程序 API
小程序中用于跳转页面的5个api是什么?区别?
小程序中用于跳转页面的5个api是什么?区别?
|
2月前
|
API
使用commons-io-2.0 API来实现监听文件变化
使用commons-io-2.0 API来实现监听文件变化
|
2月前
|
缓存 小程序 API
【社区每周】新增保存文件到系统储存空间API;小程序开发体验问卷调研发布
【社区每周】新增保存文件到系统储存空间API;小程序开发体验问卷调研发布
43 0
|
JavaScript API 定位技术
【百度地图API】多家地图API文件大小对比
原文:【百度地图API】多家地图API文件大小对比 于2011.6.9日更新百度地图API文件大小。同时更新图片。 任务描述:   明天就是元宵佳节啦~这是一个团团圆圆的节日,于是,再次想把各家API聚在一起“开大会”。
1653 0

热门文章

最新文章