mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-08 16:49:02 +03:00
[GH-ISSUE #166] [Feature request] API to search and list directories #84
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 @1024bees on GitHub (Jan 26, 2023).
Original GitHub issue: https://github.com/sigoden/dufs/issues/166
Specific Demand
An API to search for a file and show contents of a directory.
list directory API
curl http://127.0.0.1:5000/path-to-directory?list_contents=true to return a list of this files contents, analogous to running the linux command
ls /path-to-directoryon the server locallysearch API
curl http://127.0.0.1:5000/path-to-directory?search_for=${NAME_STR} would be analogous to running the linux command
find -L /path-to-directory -name "${NAME_STR}"on the server locally;Implement Suggestion
Haven't thought about this seriously yet; I figure its best to agree on an API
@sigoden commented on GitHub (Jan 27, 2023):
What scenarios need this kind of API ?
@1024bees commented on GitHub (Jan 27, 2023):
Abstractly, a list directory API would allow end users to build file system abstractions around a given dufs server.
For my use case, I'm building a GUI that when provided a URL to a
dufsserver, a file tree would be displayed. imagine something like https://doc.qt.io/qt-6/qtwidgets-itemviews-dirview-example.html. the displayed files would be available on thedufsserver@sigoden commented on GitHub (Jan 27, 2023):
Maybe add an
outputquery string to control the output format@1024bees commented on GitHub (Jan 27, 2023):
Sounds good to me, I'll look to prototype this weekend