mirror of
https://github.com/curl/curl.git
synced 2026-08-05 06:56:18 +03:00
file: add support for getting basic directory listings
Not supported on Windows (yet) Closes #13137
This commit is contained in:
parent
e14daeb8a4
commit
bfe54b0e88
13 changed files with 148 additions and 38 deletions
|
|
@ -261,4 +261,4 @@ test3024 test3025 test3026 test3027 test3028 test3029 test3030 \
|
|||
\
|
||||
test3100 test3101 test3102 test3103 \
|
||||
test3200 \
|
||||
test3201 test3202
|
||||
test3201 test3202 test3203
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ Usage: curl [options...] <url>
|
|||
file: FILE protocol options
|
||||
--create-file-mode <mode> File mode for created files
|
||||
-I, --head Show document info only
|
||||
-l, --list-only List only mode
|
||||
-r, --range <range> Retrieve only the bytes within RANGE
|
||||
</stdout>
|
||||
</verify>
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ Usage: curl [options...] <url>
|
|||
file: FILE protocol options
|
||||
--create-file-mode <mode> File mode for created files
|
||||
-I, --head Show document info only
|
||||
-l, --list-only List only mode
|
||||
-r, --range <range> Retrieve only the bytes within RANGE
|
||||
</stdout>
|
||||
</verify>
|
||||
|
|
|
|||
41
tests/data/test3203
Normal file
41
tests/data/test3203
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
HTTP
|
||||
HTTP GET
|
||||
FILE
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
file
|
||||
</server>
|
||||
<name>
|
||||
GET a directory using file://
|
||||
</name>
|
||||
<!-- doesn't work on win32, see #6379 -->
|
||||
<features>
|
||||
!win32
|
||||
</features>
|
||||
<command option="no-include">
|
||||
file://localhost%FILE_PWD/%LOGDIR/test%TESTNUMBER.dir/
|
||||
</command>
|
||||
<file name="%LOGDIR/test%TESTNUMBER.dir/dir-listing-test.txt">
|
||||
Contents of file are irrelevant
|
||||
</file>
|
||||
</client>
|
||||
|
||||
#
|
||||
# Verify data after the test has been "shot"
|
||||
<verify>
|
||||
<errorcode>
|
||||
0
|
||||
</errorcode>
|
||||
<stdout>
|
||||
dir-listing-test.txt
|
||||
</stdout>
|
||||
</verify>
|
||||
</testcase>
|
||||
Loading…
Add table
Add a link
Reference in a new issue