* Add MLST command in the form of a Get method
The `LIST` and `MLSD` commands are inefficient when the objective
is to retrieve one single `Entry` for a known path, because the only way
to get such an entry is to list the parent directory using a data
connection. The `MLST` fixes this by allowing one single `Entry` to be
returned using the control connection.
The name `Get` was chosen because it is often used in conjunction with
`List` as a mean to get one single entry.
Signed-off-by: Thomas Hallgren <thomas@datawire.io>
* Changes in response to code review:
- Rename `Get` to `GetEntry` (because it returns an `*Entry`)
- Add test-case for multiline response on the control connection
- Fix issues with parsing the multiline response.
Signed-off-by: Thomas Hallgren <thomas@datawire.io>
* Add sample output from MLST to GetEntry comment.
Signed-off-by: Thomas Hallgren <thomas@datawire.io>
* Changes in response to code review:
- Remove unused `time.Time` argument
- Add struct labels to make `govet` happy
Signed-off-by: Thomas Hallgren <thomas@datawire.io>
* Remove time arg when calling parseNextRFC3659ListLine
Signed-off-by: Thomas Hallgren <thomas@datawire.io>
Signed-off-by: Thomas Hallgren <thomas@datawire.io>
I happened upon this with hostedftp.com:
-r-------- 0 user group 65222236 Feb 24 00:39 UABlacklistingWeek8.csv
Otherwise a fine Unix-like list line, but link count is 0 for some
reason. That company wasn't able to tell me why.