* Return the stats of a file or directory * @param {string} filename * @returns {object}
(filename)
| 229 | * @returns {object} |
| 230 | */ |
| 231 | stats(filename) { |
| 232 | return new Promise((resolve, reject) => { |
| 233 | reject = setMessage(reject); |
| 234 | window.resolveLocalFileSystemURL( |
| 235 | filename, |
| 236 | (entry) => { |
| 237 | sdcard.stats( |
| 238 | entry.nativeURL, |
| 239 | (stats) => { |
| 240 | helpers.defineDeprecatedProperty( |
| 241 | stats, |
| 242 | "uri", |
| 243 | function () { |
| 244 | return this.url; |
| 245 | }, |
| 246 | function (val) { |
| 247 | this.url = val; |
| 248 | }, |
| 249 | ); |
| 250 | stats.url = filename; |
| 251 | resolve(stats); |
| 252 | }, |
| 253 | reject, |
| 254 | ); |
| 255 | }, |
| 256 | reject, |
| 257 | ); |
| 258 | }); |
| 259 | }, |
| 260 | |
| 261 | /** |
| 262 | * Verify if a file or directory exists |
nothing calls this directly
no test coverage detected