May 19, 2021 WeChat Mini Program Development Document
Gets a list of local cached files saved under the small program
Property | Type | The default | Required | Description |
---|---|---|---|---|
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 |
---|---|---|
fileList | Array.<Object> | An array of files, each of which is a FileItem |
The structure of res.fileList
Property | Type | Description |
---|---|---|
filePath | string | File path (local path) |
size | number | The local file size, in bytes |
createTime | number | The timestamp at the time the file was saved, from 1970/01/01 08:00:00 to the number of seconds of the current time |
wx.getSavedFileList({
success (res) {
console.log(res.fileList)
}
})