Closed pyhedgehog closed 6 years ago
Also "size" will be good - to choose between "readFile" and "createReadStream" API.
Noted. Thank you.
If you find other files API related issues, you can try look https://github.com/bigcompany/hook.io-vfs
Files API should return Vinyl
object such as https://github.com/gulpjs/vinyl
Do you know this library?
Vinyl
should have all properties we need. If anything, maybe small issues inhook.io-vfs
mapping to Vinyl.
I've added more metadata to stat API.
You can try something like: https://hook.io/files/stat?path=a.txt
Please let me know what other properties you'd like to see.
cc @pyhedgehog
Closing since it should be resolved
Example stat object looks like this:
{
"size": 3,
"atime": "2017-12-12T14:08:49.320Z",
"ctime": "2017-08-22T21:05:19.999Z",
"mtime": "2017-08-22T21:05:19.999Z"
}
Please let us know if you have any additional feedback.
It's assumed to have "ctime", "mtime" or something alike (i.e. "version" or "revision") in return of file
stat()
function.