stackvana / hook.io

Open-Source Microservice Hosting Platform
https://hook.io
Other
1.26k stars 117 forks source link

API /files/stat doesn't have any dates #246

Closed pyhedgehog closed 6 years ago

pyhedgehog commented 8 years ago

It's assumed to have "ctime", "mtime" or something alike (i.e. "version" or "revision") in return of file stat() function.

pyhedgehog commented 8 years ago

Also "size" will be good - to choose between "readFile" and "createReadStream" API.

Marak commented 8 years ago

Noted. Thank you.

If you find other files API related issues, you can try look https://github.com/bigcompany/hook.io-vfs

Marak commented 8 years ago

Files API should return Vinyl object such as https://github.com/gulpjs/vinyl

Do you know this library?

Marak commented 8 years ago

Vinyl should have all properties we need. If anything, maybe small issues inhook.io-vfs mapping to Vinyl.

Marak commented 6 years ago

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.

Marak commented 6 years ago

cc @pyhedgehog

Marak commented 6 years ago

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.