(path, callback)
| 40 | |
| 41 | // Given a path, return a continuable for the stat object. |
| 42 | function stat(path, callback) { |
| 43 | if (!callback) return stat.bind(this, path); |
| 44 | var errorHandler = wrapCallback(callback); |
| 45 | root.getFile(path, {create: false}, function (fileEntry) { |
| 46 | fileEntry.getMetadata(function (metaData) { |
| 47 | var mtime = metaData.modificationTime / 1000; |
| 48 | var mseconds = Math.floor(mtime); |
| 49 | var mtime = [mseconds, Math.floor((mtime - mseconds) * 1000000000)]; |
| 50 | callback(null, { |
| 51 | ctime: mtime, // Not available on this platform |
| 52 | mtime: mtime, |
| 53 | dev: 0, // Not available on this platform |
| 54 | ino: 0, // Not available on this platform |
| 55 | mode: 0100644, // Not supported on this platform |
| 56 | uid: 0, // Not available on this platform |
| 57 | gid: 0, // Not available on this platform |
| 58 | size: metaData.size |
| 59 | }); |
| 60 | }, errorHandler); |
| 61 | }, errorHandler); |
| 62 | } |
| 63 | |
| 64 | function read(path, encoding, callback) { |
| 65 | if (typeof encoding === "function") { |
nothing calls this directly
no test coverage detected