Skip to content

Conversation

@coolaj86
Copy link

@coolaj86 coolaj86 commented Aug 13, 2018

PR Dependencies:

Description

Show basic file details in json (w3-style file object)

curl https://pretty-stingray-41.telebit.ppl.family/demo/ -H 'Accept: application/json' | python -m json.tool
[
    {
        "lastModified": "2018-08-13T03:45:40.000Z",
        "name": "..",
        "size": 1054,
        "type": "inode/directory"
    },
    {
        "lastModified": "2018-07-11T00:34:26.000Z",
        "name": "foo.txt",
        "size": 4,
        "type": "text/plain"
    }
]

@greggman
Copy link

greggman commented Apr 4, 2020

Would it be good to match nginx here? Looks like type in nginx is one of "directory", "file", "other" and mtime is RFC1123-date of HTTP-date defined by RFC2616

@coolaj86
Copy link
Author

@greggman I'd side with doing it the JavaScript way because this is a JavaScript library. That said, I'd be happy to make that an option (or even the default) if things got moving forward again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants