Skip to content

Commit 2216c2e

Browse files
committed
docs: add options for mkdir and delete switch
1 parent b7d102a commit 2216c2e

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ server [options]
6060
6161
-U|--global-upload
6262
Allow upload files for all url paths.
63-
If filename exists, will try to add or increase numeric suffix.
63+
If filename exists, will try to remove it first if deleting is enabled(e.g. by --delete),
64+
otherwise will try to add or increase numeric suffix.
6465
Use it with care.
6566
-u|--upload <url-path> ...
6667
Set url paths(and sub paths) that allows to upload files.
@@ -69,6 +70,20 @@ server [options]
6970
Similar to --upload, but use file system path instead of url path.
7071
Use it with care.
7172
73+
--global-mkdir
74+
Allow create sub directory under all url paths.
75+
--mkdir <url-path> ...
76+
Allow create sub directory under specific url paths(and sub paths).
77+
--mkdir-dir <fs-path> ...
78+
Similar to --mkdir, but use file system path instead of url path.
79+
80+
--global-delete
81+
Allow delete items under all url paths.
82+
--delete <url-path> ...
83+
Allow delete items under specific url paths(and sub paths).
84+
--delete-dir <fs-path> ...
85+
Similar to --delete, but use file system path instead of url path.
86+
7287
-A|--global-archive
7388
Allow user to download the whole contents of current directory for all url paths.
7489
A download link will appear on top part of the page.

README.zh-CN.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,29 @@ server [选项]
5959
6060
-U|--global-upload
6161
对所有URL路径开启上传权限。
62-
如果文件已存在,则尝试添加或递增数字后缀。
62+
如果文件已存在,若已启用删除(例如--delete选项),则尝试先删除文件,
63+
否则尝试添加或递增数字后缀。
6364
请谨慎使用。
6465
-u|--upload <URL路径> ...
6566
设置允许上传的URL路径(及子路径)。
6667
请谨慎使用。
6768
--upload-dir <文件系统路径> ...
6869
与--upload类似,但指定的是文件系统路径,而不是URL路径。
6970
71+
--global-mkdir
72+
对所有URL路径开启创建子目录权限。
73+
--mkdir <url-path> ...
74+
设置允许创建子目录的URL路径(及子路径)。
75+
--mkdir-dir <fs-path> ...
76+
与--mkdir类似,但指定的是文件系统路径,而不是URL路径。
77+
78+
--global-delete
79+
对所有URL路径开启删除子项权限。
80+
--delete <url-path> ...
81+
设置允许删除子项的URL路径(及子路径)。
82+
--delete-dir <fs-path> ...
83+
与--delete类似,但指定的是文件系统路径,而不是URL路径。
84+
7085
-A|--global-archive
7186
对所有URL路径开启打包下载当前目录内容的功能。
7287
页面顶部会出现下载链接。

0 commit comments

Comments
 (0)