Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 2.04 KB

README.md

File metadata and controls

62 lines (42 loc) · 2.04 KB

rabbitFT

Maven Central

Rabbit File Transfer is an open source java library for sharing file(s) over SFTP or Sharepoint channel. It determines possible parallel threads and initiate file transfer using available multiple threads.

Table of contents

Quick Start

To quick start, include rabbitFT to your project dependency :

 <dependency>
   <groupId>com.github.jweavers</groupId>
   <artifactId>rabbitft</artifactId>
   <version>0.1.0</version>
 </dependency>

In your code, create ConnectionContext for the specific channel.

SFTP

ConnectionContext ctx = new SftpContext(host_name, port_no, user, sftp_folder_path, password);

Sharepoint

ConnectionContext ctx = new SharepointContext(client, secret, sharepoint_domain, sharepoint_folder_path, bearer);

Note : In most cases, sharepoint_folder_path starts with Documents folder. So, it's value would be Documents\<your folder path>.

Now using ConnectionContext, you can get fresh channel instance for uploading files.

RabbitFT rabbitft = FileTransfer.newChannelInstance(ctx);
rabbitft.upload(files);

That's it ! :)

To enable debug mode, add following line before calling upload :

rabbitft.setConsoleDebugMode(true);

Bugs

Copyright and license

Code and documentation Copyright (c) 2020 jweavers. Code released under the MIT License.