FTPEntry.parse constructor
FTPEntry.parse(
- String responseLine,
- ListCommand cmd
Implementation
factory FTPEntry.parse(String responseLine, ListCommand cmd) {
if (responseLine.trim().isEmpty) {
throw FTPConnectException("Can't parse a null or blank response line");
}
if (cmd == ListCommand.LIST) {
return FTPEntry._parseListCommand(responseLine);
} else if (cmd == ListCommand.NLST) {
return FTPEntry._(responseLine, null, null, FTPEntryType.UNKNOWN, null,
null, null, null, null, null, null, null);
} else {
return FTPEntry._parseMLSDCommand(responseLine);
}
}