Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ant任务列出https上的文件_Ant - Fatal编程技术网

Ant任务列出https上的文件

Ant任务列出https上的文件,ant,Ant,我需要在https上列出文件夹中的文件名 如果是FTP,我可以用 <ftp action="list" server="" userid="" password="" listing="list.txt"> <fileset> <include name="*suite*.zip" /> </fileset> </ftp> https的等价物是什么?在HTTP方法列表中,没有允许“列出”文件的操作。

我需要在https上列出文件夹中的文件名

如果是FTP,我可以用

<ftp action="list" server="" userid="" password="" listing="list.txt">
    <fileset>
        <include name="*suite*.zip" />
    </fileset>
</ftp>


https的等价物是什么?

在HTTP方法列表中,没有允许“列出”文件的操作。HTTP是一种传输HTML等内容的协议,它取决于服务器如何响应URI请求

我能想到的最接近的任务是:


然后需要解析输出以检索文件列表


另一种选择(尽管以前从未尝试过)似乎是使用第三方。它具有接受不受信任或自签名证书的属性。

我认为https没有任何API提供给您文件夹。某些web服务器允许您对简单的“索引”文件进行epose。我猜你将不得不为此做你自己的蚂蚁任务。从一个简单的opensrc页面开始,并在此基础上使用http组件连接到索引页面(如果它存在)并对其进行解析以获得列表
<get src="https://some_address/" dest="output.txt" />