Commit Graph

15 Commits

Author SHA1 Message Date
Jean-Luc Lacroix
a93533d16c
New date formats for non standard dates returned by LIST (#354) 2024-01-11 14:31:46 -05:00
Thomas Hallgren
0aeb8660a7
Add MLST command in the form of a Get method (#269)
* 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>
2022-08-21 17:25:29 -04:00
Julien Laffaye
05cd33e2ad Fix issues reported by errcheck 2021-03-06 19:36:26 -05:00
Julian Kornberger
c1312a7102 Correctly parse symlink (#152)
fixes #151
2019-06-24 10:48:59 +02:00
Julian Kornberger
9284a88df5 Support line with ACL permissions (#146)
closes #145
2019-05-22 12:26:03 +02:00
Julien Laffaye
b218223d02 Use error values in tests 2019-01-22 16:04:06 +01:00
Julien Laffaye
f75dead520 error strings should not be capitalized (ST1005) 2019-01-22 14:50:39 +01:00
Shannon Wynter
4772add9d0 Make it possible to specify what timezone to parse timestamps in 2018-03-20 15:07:44 +10:00
Julian Kornberger
5bde7e961e Don't reduce year of date to two digits 2018-01-04 13:28:55 +01:00
Julian Kornberger
352a1d8821 Fix time parsing and reduce syscalls
closes #109
2018-01-04 13:28:55 +01:00
laraoz
090169ab63 #105 Fix parseRFC3659ListLine issue 2017-09-26 20:33:03 -03:00
Julian Kornberger
0445d85941 Fix possible runtime error
closes #97
2017-07-20 21:09:00 +02:00
Allen Luce
4b298416ea Add a case to catch Unix-like but 0 link count list line
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.
2017-07-06 00:55:11 +00:00
Julien Laffaye
602886c6b8 Do not export the scanner type
It is an internal specific to parse list responses.
2017-03-04 13:01:41 +01:00
Julian Kornberger
8082b59766 Refactoring the line parsing 2016-12-31 18:20:29 +01:00