Http file server list files and directories
-
Hi, I'm trying to create a list of files and directories from an http file server.
I'm currently creating it by using
curl fileserver
, getting the response, stripping unwanted text and getting only the output I want. This is a very bad way of doing this, because I need to hard code what exatly to strip out.Is there a smarter way to do this?
NOTE: The file server is http://archive.ubuntu.com/ubuntu/pool/.
-
Hi, I'm trying to create a list of files and directories from an http file server.
I'm currently creating it by using
curl fileserver
, getting the response, stripping unwanted text and getting only the output I want. This is a very bad way of doing this, because I need to hard code what exatly to strip out.Is there a smarter way to do this?
NOTE: The file server is http://archive.ubuntu.com/ubuntu/pool/.
@Sucharek
It's much better to make the equivalent calls yourself. If you like curl you can build and link as a library, code at libcurl - the multiprotocol file transfer library, and e.g. https://everything.curl.dev/libcurl/cplusplus, https://dev.to/hi_artem/using-libcurl-in-c-c-application-4668 ?