Skip to content

A dedicated SFTP client for increasing throughput performance on high latency WAN/Internet transfers

License

Notifications You must be signed in to change notification settings

sshtools/push-sftp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Push SFTP

A dedicated SFTP client for increasing throughput performance on high latency WAN/Internet transfers.

This repository hosts both the command line interface, and the graphical interface called FileDrop. SSH and SFTP operations are supplied by the Maverick Synergy Java SSH Library which includes the "push" mechanism itself.

Installers

End-user installers and documentation is available at jadaptive.com.

Development

The project uses Maven as a build system. You should be able to import the pom.xml into any modern Java IDE. Pull requests are welcomed and encouraged for new features and bug fixes.

Implementing commands

If you want to implement a new child command within the interactive command you first need to extend SftpCommand.

import picocli.CommandLine.Command;

@Command(name = "hello", description = "Hello world example")
public class Hello extends SftpCommand {

	@Override
	protected Integer onCall() throws Exception {
		
		getTerminal().getWriter().println("Hello world!");
		return 0;
	}
}

Then add the command class to the PSFTPCommands @Command annotation, in the subcommands array.

@Command(name = "push-sftp", mixinStandardHelpOptions = false, 
			description = "Interactive shell", 
			subcommands = { Ls.class, Cd.class, Lcd.class, Pwd.class, Lls.class, 
					Lpwd.class, Help.class, Rm.class, Rmdir.class,
					Mkdir.class, Umask.class, Bye.class, Chgrp.class, 
					Chown.class, Chmod.class, Push.class, Put.class, Get.class,
					ChildUpdateCommand.class, Info.class, Hello.class
					})
public class PSFTPCommands implements InteractiveSshCommand {

If you fail to do this the command will not appear in the help and will not be executable within the interactive command shell.

To use the current SFTP connection SftpCommand provides a method to return an SftpClient

var sftp = getSftpClient()

About

A dedicated SFTP client for increasing throughput performance on high latency WAN/Internet transfers

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published