简体   繁体   English

如何从Android中的PHP服务器下载包含文件(pdf,png等)的文件夹

[英]how to download folder containing files(pdf,png etc) from php server in android

i want to download folder containing files like pdf,jpg,png etc from web services.I have written a application that can download pdf,png file.But i want to download folder containing several files. 我想从Web服务下载包含pdf,jpg,png等文件的文件夹。我编写了一个可以下载pdf,png文件的应用程序。但是我想下载包含多个文件的文件夹。 So my question is- is it possible to download folder and if yes then how can i download folder from server in android. 所以我的问题是-是否可以下载文件夹,如果是的话,我该如何从android中的服务器下载文件夹。 thank you 谢谢

If you can download one file, why wouldn't you be able to download several? 如果可以下载一个文件,为什么不能下载多个文件? Create the folder on Android, queue the files and start the next download when the current is finished, filling the folder. 在Android上创建文件夹,将文件排入队列,并在当前文件完成后开始下一次下载,并填充文件夹。 Also Android supports ZIP , so that might be your best call. Android也支持ZIP ,因此这可能是您最好的选择。

Folder is nothing but an FILE but a different type of file. 文件夹不过是FILE,而是另一种类型的文件。 Once you get the folder you can list down the files in it. 获取文件夹后,您可以在其中列出文件。 You already have URL with the folder, u just need to append the URL of the folder to the files in it and download them one by one. 您已经有了该文件夹的URL,您只需要将该文件夹的URL附加到其中的文件中,然后一步一步下载它们即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM