Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listDirectoryContent (OnlyNames) (Response: 500 'MLSD': command not understood)) #38

Open
lewinpauli opened this issue May 14, 2024 · 1 comment

Comments

@lewinpauli
Copy link

with the listDirectoryContentOnlyNames() & listDirectoryContent() method I am getting the following exception:

FTPConnectException (FTPConnectException: Connection refused. (Response: 500 'MLSD': command not understood))

OS: Linux Fedora 40

other methods like checkFolderExistence() are working fine

example code:

import 'package:ftpconnect/ftpconnect.dart';

main() async {
  FTPConnect ftpConnect = FTPConnect('example.com', user: 'user', pass: 'pass');
  
  await ftpConnect.connect();
  
  List<String> DirectoryContent = await ftpConnect.listDirectoryContentOnlyNames();

  print('DirectoryContent: $DirectoryContent');

  await ftpConnect.disconnect();
}

@mariusvn
Copy link

if your FTP does not support MLSD, you can change the command used like this:

_session = FTPConnect('<your-url>', user: username, pass: password);
_session!.listCommand = ListCommand.LIST;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants