pure_ftp_server 0.0.7 copy "pure_ftp_server: ^0.0.7" to clipboard
pure_ftp_server: ^0.0.7 copied to clipboard

Simple and powerful FTP Server on Dart.

example/pure_ftp_server_example.dart

import 'dart:io';
import 'dart:typed_data';

import 'package:pure_ftp_server/pure_ftp_server.dart';

Future<void> main() async {
  final ftpServer = FtpServer(
    logCallback: print,
    initialOptions: FtpServerInitialOptions(
      port: 8080,
      users: [
        FtpUser(
          username: 'admin',
          password: 'admin',
          fileSystem: FileSystem.system(Directory.current),
        ),
        FtpUser(
          username: 'admin2',
          password: 'admin',
          fileSystem: FileSystem.inMem(
            initialData: {
              'test': {
                'readMe.txt': Uint8List.fromList('i\'m test'.codeUnits),
              },
            },
          ),
        ),
      ],
    ),
  );
  await ftpServer.start();
}
2
likes
135
points
30
downloads

Publisher

verified publisherartemsemirenko.dev

Weekly Downloads

Simple and powerful FTP Server on Dart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

meta

More

Packages that depend on pure_ftp_server