mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-10 01:20:38 +03:00
[GH-ISSUE #682] Add a JSON stat/metadata endpoint for a specific file or directory path #1092
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jgoedeke on GitHub (Apr 9, 2026).
Original GitHub issue: https://github.com/sigoden/dufs/issues/682
Summary
Please add a way to query metadata for a single file or directory path and get a JSON response, without having to list the parent directory and filter client-side.
Current behavior
Right now, the JSON API seems to be listing-oriented:
?jsonreturns directory contents as apathsarrayThis works, but it is awkward and inefficient, especially for large directories.
Desired behavior
Support a direct "stat" style JSON response for an exact path.
For example, any of these shapes would be useful:
Option A:
GET /some/path?jsonIf the path points to a file or directory, return metadata for that exact path as a single JSON object instead of a directory listing.
Option B: dedicated query flag
Something like:
GET /some/path?statGET /some/path?metaGET /some/path?json&statOption C: dedicated API endpoint
Something like:
GET /__dufs__/stat?path=/some/pathExample response
For directories, a similar response could be returned:
Why this would help
PROPFINDdufseasier to use as a lightweight file metadata APIThanks!