This is useful for servers that do not offer up
hidden folders/files by default when using LIST/MLSD
commands.
Setting forceListHidden to true will force the use of
the 'LIST -a' command even when MLST support has
been detected.
* 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>
Listing a current directory (when the path argument is empty)
would send the command "LIST " with trailing whitespace to FTP
resulting in 500 errors with Solaris FTP server.
This patch fixes that.
added tests for recursive delete
added change dir to fix test + refactor
fixed path issues
changes directory now instead of deleting by path
proftpd fix
added file edge case + more tests
added directory does not exist test
added correct directory after delete test
fixed correct directory test
renamed test directories + files
missed a renamed