Skip to content

clrung/FTPSearcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FTP Searcher

This was our culminating project for an Introduction to Computer Science class at Bucknell University. It uses Java to launch a GUI that connects to an FTP server and allows a user to search for and download files on the server.

Usage

  1. Run GUI.java in eclipse or compile and run on the command line. A window will appear with fields to input login credentials.

Login Screen

  1. Click the 'Connect' button, and a dialog box will indicate that a connection has been established.
  2. Search for a filename in the search box and click the Search button.
  • If multiple files are found with the same filename, a numbered list showing the filename and absolute path will appear. Choose which file number to download in the dropdown and click the 'Download' button.

Search Results

  1. If the filename and path are known, it may be input in the bottom text box and downloaded via the 'Download' button, forgoing the search process.
  2. After the 'Download' button is clicked, a chooser will appear to designate the save location and name of the file to be downloaded.
  3. To terminate the connection with the server, click the 'Logoff' button. A dialog box will indicate that the logoff was successful.

Design

There are three main components of this program:

  1. FTPConn
  • Handles all integration with the server. This class obtains information about the server's contents, file information, and is used to download files.
  1. Parser
  • Retrieves an ArrayList of Strings from FTPConn, containing every file and directory path, and creates an ArrayList of FileObjects to be sent to the Tree.
  1. Tree
  • Reads the Parsers output and generates a tree of FileObjects. This is used to search the server's contents efficiently. When a search is performed, an ArrayList of FileObjects are sent to the GUI, and the chosen FileObject is sent to the download method of the FTPConn.

Testing

Each class is tested with the JUnit framework.

After a connection to a server has been established, the program recursively iterates through all of the directories on the server and generates a Tree, containing FileObjects. A FileObject contains the file name, path, and a boolean flag that indicates if it is a directory.

Class Relationships

Class Relationships

UML Diagram

UML Diagram

About

Java app that downloads files from an FTP server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published