On Saturday, 14 May 2022 at 08:42:46 UTC, Anonymouse wrote:
Before I go on duplicating effort, does anyone have anything that can access FTP beyond PUT and GET?

I need to read file information from a NAS so I know if I should upload a file or not. `dlang-requests` has `Request.post` and `Request.get`, but seemingly no way to LS.

Added LIST command in v2.0.8

```
ᐅ cat source/app.d
import std.stdio;
import requests;

void main()
{
    auto rq = Request();
auto rs = rq.execute("LIST", "ftp://ftp.iij.ad.jp/pub/FreeBSD/";);
    writeln(rs.responseBody);

}
/tmp/ttt ᐅ dub run
Running ttt
-rw-rw-r--    1 ftp      ftp          4259 May 07  2015 README.TXT
-rw-rw-r--    1 ftp      ftp            35 May 12 09:00 TIMESTAMP
drwxrwxr-x 9 ftp ftp 169 Oct 05 2015 development
-rw-r--r--    1 ftp      ftp          2871 May 11 10:00 dir.sizes
drwxrwxr-x   22 ftp      ftp          8192 May 09 23:00 doc
drwxrwxr-x    6 ftp      ftp            92 Jan 10 21:38 ports
drwxrwxr-x   12 ftp      ftp           237 Feb 06  2021 releases
drwxrwxr-x   12 ftp      ftp           237 May 05 18:00 snapshots

```

--
Support πŸ‡ΊπŸ‡¦!
  • FTP LS Anonymouse via Digitalmars-d-learn
    • Re: FTP LS rikki cattermole via Digitalmars-d-learn
    • Re: FTP LS ikod via Digitalmars-d-learn
    • Re: FTP LS ikod via Digitalmars-d-learn
    • Re: FTP LS ikod via Digitalmars-d-learn

Reply via email to