feat: API to search and list directories (#177)

use `?simple` to output path name only.
use `?json` to output paths in json format.
By default, output html page.

close #166
This commit is contained in:
sigoden
2023-02-20 11:05:53 +08:00
committed by GitHub
parent c6dcaf95d4
commit 7d6d7d49ca
10 changed files with 115 additions and 43 deletions

View File

@@ -171,6 +171,16 @@ Delete a file/folder
curl -X DELETE http://127.0.0.1:5000/path-to-file-or-folder
```
List/search directory contents
```
curl http://127.0.0.1:5000?simple # output pathname only, just like `ls -1`
curl http://127.0.0.1:5000?json # output name/mtime/type/size and other information in json format
curl http://127.0.0.1:5000?q=Dockerfile&simple # search for files, just like `find -name Dockerfile`
```
<details>
<summary><h2>Advanced topics</h2></summary>