ftpclient 0.4.0 copy "ftpclient: ^0.4.0" to clipboard
ftpclient: ^0.4.0 copied to clipboard

discontinuedreplaced by: ftpconnect
outdated

A simple dart FTP Client Library to interact with FTP Servers

example/ftpclient_example.dart

import 'dart:io';

import 'package:ftpclient/ftpclient.dart';

void main() {
  // Create Connection
  FTPClient ftpClient = new FTPClient('example.com', user: 'myname', pass: 'mypass');

  // Connect to FTP Server
  ftpClient.connect();

  try {
    // Create Directory
    ftpClient.makeDirectory('test');

    // Change Directory
    ftpClient.changeDirectory('test');

    // Get current Directory
    print(ftpClient.currentDirectory());

    // Upload File
    ftpClient.uploadFile(new File('test.zip'));
    
    // Navigate back
    ftpClient.changeDirectory('..');

    // Delete Directory
    ftpClient.deleteDirectory('test');
  } finally {
    // Disconnect
    ftpClient.disconnect();
  }
}
12
likes
0
pub points
73%
popularity

Publisher

verified publishernexific.com

A simple dart FTP Client Library to interact with FTP Servers

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

path

More

Packages that depend on ftpclient