GithubHelp home page GithubHelp logo

file-sharing-application's Introduction

Simple File Sharing (SFS) Using Java java

Contents
- Brief description of SFS
- Details needed to share files
- Details to know before sending/receiving
- How to compile and run
- How to exit

Brief description of SFS

SFS allows files to be shared between two machines. One machine acts as the server and sends files while another acts as the client and receives the files.
SFS supports various formats of files. To list a few: txt, doc, binary and jpg files.

Details to know before receiving a file

If you are receiving a file then you are required to know the IP Address of the sender as well as the port number.
Prior to requesting the file you need to ask the sender for these details.

How the sender can view their IP Address

Mac + Linux

Type hostname โ€“I or ip addr in the terminal.

Windows

Type ipconfig in the command prompt.
Check the number next to "IPv4 Address. . . . . . . . . . . :"

How to compile

  • If you are running on the command line, first change the path where the src folder is stored using the cd command.
    Eg: cd Documents/CS2101/W07/src
  • Once in the src folder type javac *.java to compile all the files
  • Then type java Main to run Main

Notes for sending files

  • To send a file once the program is running type SEND to start the server.
  • When the client requests to view files, specify the full path of where you want to share from.
    Eg: If I wanted to share files from the CS folder I type C:\Users\Me\OneDrive\Documents\CS

Notes for receiving files

  • When requesting a file to receive, type the full path including the file extension.
    Eg: C:\Users\Me\IdeaProjects\MP1-Final\src\doc.txt (On Windows)
  • When specifying where you want to save the downloaded file, type the name of the new file as well as the file extension.
    Eg: If I was downloading a text file and wanted to call it download I type C:\Users\Me\OneDrive\Documents\CS\download.txt (On Windows)
  • If there is a mistake with any of this the file transfer will likely fail.

How to exit

  • Type either exit or press CTRL + C to kill the program.


file-sharing-application's People

Contributors

anuragreggie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.