download

fun FTPClient.download(remotePath: String, dispatcher: CoroutineDispatcher = Dispatchers.IO): Flow<ByteArray>

Downloads a file from the remote FTP server specified by remotePath.

Returns a Flow that emits each byte of the file content as it is downloaded.

Example usage:

ftpClient.download("/path/to/remote/file").collect { byte ->
// Process the downloaded byte
}