8000 GitHub - random-orange-2830/ftplib: ftplib is a java library that you can use to make an ftp client · GitHub
[go: up one dir, main page]

Skip to content
random-orange-2830Public

About

ftplib is a java library that you can use to make an ftp client

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

ftplib

ftplib is a java library that you can use to make an ftp client

Features

  • Both Active and Passive mode supported
  • Search files by regex to get a files in a tree structure
  • Download files/folders by regex

How to use

Setup client

    import com.jayanthag.ftp.FTPClient;

    ...
    ...
    ...

    FTPClient ftpClient = new FTPClient(host, port);
    ftpClient.connect();
    ftpClient.login(username, password);

    ...
    ...

    ftpClient.stopClient();

Get all files/folders in current dir

   import com.jayanthag.ftp.models.FileElement;

   ...

5614
   ...
   ...

   ArrayList<FileElement> files = ftpClient.ls();
   /* a FileElement object represents a folder/file,
    it may hold references to files/folders inside itself,
    and also to its parent
    /*

Download all python files

    ...
    ...
    ...

    ftpClient.regexDownload(".py$");

About

ftplib is a java library that you can use to make an ftp client

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0