May 19, 2021 WeChat Mini Program Development Document
Get file information for local files. This interface can only be used to get files that have been saved to the local area, and if you need temporary file information, use the wx.getFileInfo() interface.
Property | Type | The default | Required | Description |
---|---|---|---|---|
filePath | string | Is | File path (local path) | |
success | function | Whether | The interface calls a successful callback function | |
fail | function | Whether | The interface calls the failed callback function | |
complete | function | Whether | Callback function at end of interface call (call succeeds, fails are executed) |
Property | Type | Description |
---|---|---|
size | number | File size, unit B |
createTime | number | The timestamp at the time the file was saved, from 1970/01/01 08:00:00 to the number of seconds at that moment |
wx.getSavedFileList({
success (res) {
console.log(res.fileList)
}
})