Home

Awesome

MinimalFTP Build Status

A lightweight, simple FTP server. Pure Java, no libraries.

Features

Although it's named "minimal", it supports a bunch of features:

Specification Support

The required minimum implementation is already done, however, there are still commands that can be implemented.

Usage

Dependency

MinimalFTP is published on JCenter and Maven Central

Maven

<dependency>
  <groupId>com.guichaguri</groupId>
  <artifactId>minimalftp</artifactId>
  <version>1.0.6</version>
  <type>pom</type>
</dependency>

Gradle

compile 'com.guichaguri:minimalftp:1.0.6'

Ivy

<dependency org='com.guichaguri' name='minimalftp' rev='1.0.6'>
  <artifact name='minimalftp' ext='pom' />
</dependency>

API

Check out more examples here :)

// Uses the current working directory as the root
File root = new File(System.getProperty("user.dir"));

// Creates a native file system
NativeFileSystem fs = new NativeFileSystem(root);

// Creates a noop authenticator, which allows anonymous authentication
NoOpAuthenticator auth = new NoOpAuthenticator(fs);

// Creates the server with the authenticator
FTPServer server = new FTPServer(auth);

// Start listening synchronously
server.listenSync(21);