title: flutter connect FTP and download file
body: <p>I am trying to connect to FTP with <code>ftpconnect 1.0.0</code> and download a file.<br />
  There was something I didn't understand, so I wrote a question.<br />
  If you look at the method that connects to FTP and downloads a file, it takes two parameters.</p>
  <pre><code>/// Download the Remote File [sRemoteName] to the local File [fFile]
  Future&lt;bool&gt; downloadFile(
      String? sRemoteName,
      File fFile, {
      TransferMode mode = TransferMode.binary,
      FileProgress? onProgress,
      bool? supportIPv6,
    }) {
      return FileDownload(_socket, mode, _log).downloadFile(sRemoteName, fFile,
          onProgress: onProgress, supportIPV6: supportIPv6);
    }
  </code></pre>
  <p>Is <code>sRemoteName</code> the name of the file on FTP and <code>fFile</code> the file you want to save?<br />
  If it is correct, how do I set the path to save it in the app?<br />
  Thanks in advance for the reply.</p>
  <p>my source code</p>
  <pre><code>import 'dart:io';
  
  import 'package:flutter/widgets.dart';
  import 'package:ftpconnect/ftpconnect.dart';
  
  class FTPServer extends ChangeNotifier{
    FTPConnect? ftpConnect;
    File? file;
  
    Future&lt;void&gt; _fileMock(String strFileName) async {
      final Directory directory = Directory('/test')
        ..createSync(recursive: true);
      file = File('${directory.path}/$strFileName');
      notifyListeners();
    }
  
    //FTP Connection
    connectionFTP() async {
      ftpConnect = FTPConnect('IP address', user: 'user', pass: 'password', port: portNumber);
      notifyListeners();
    }
  
    //Change Dir
    Future&lt;void&gt; changeDirectoryFTP(String strFilePath) async {
      try {
        bool bRes = await ftpConnect!.connect();
        await ftpConnect!.changeDirectory(strFilePath);
      }catch(e){
        print('Error : ${e.toString()}');
      }
      notifyListeners();
    }
  
    //Download File
    Future&lt;void&gt; downloadFileFTP() async{
      try {
        bool bRes = await ftpConnect!.connect();
        await ftpConnect!.downloadFileWithRetry('FTP File Name', File name to save , pRetryCount: 1);
        await ftpConnect!.disconnect();
      }catch(e){
        print('Error : ${e.toString()}');
      }
      notifyListeners();
    }
  
  }
  </code></pre>