Giter Site home page Giter Site logo

javafilemanager's Introduction

File Manager

a Java file manager - Meant to be read and thought about.

You can fork this repo, and clone it down onto your computer. The main() function is in class FileManager. You should be able to run that function.

This lab is meant to be an activity of reading the code and documenting what you found out. It is not necessarily a coding project. You do not need to write code to finish the lab. You only need to document what you found here.

What it does

This is a very simple file management shell, it shows how to manipulate files using java standard library calls. Available commands:

  • list a folder
  • info on on a file
  • mkdir make a new folder
  • rename a file
  • copy, move, delete files
  • quit the file manager shell

There are three classes in this app: FileManager, FileOperator and Console in src/main/java. Each class a different reason for being. There is a simple file hierarchy for manual testing in the test folder. You can use the test folder for doing simple file manipulations.

Your task...

You should create a page of documentation in the Help for FileManager file describing how you use each of the commands the program provides. You can use Mastering Markdown to learn more about what markdown is and how you use it to write markdown files. There is also info at Wikipedia : Markdown.

Write a short summary of what each command does and how it is used. Give a real example of what the user would see using each command. Edit the Help for FileManager file with your explanatory text.

Things to consider

Why are the manipulation commands, the things that affect files and folders, in a different class than the file manager itself?

Why is all the input and output factored out into a separate class?

Why is Copy/Move in the same method? What about the two operations are so much the same? How would you separate them? Would it make it more understandable or less to separate them?

What would you have to do to:

  • add the idea of a current folder?
  • how would you add a change folder command?
  • how would you add a command to display the contents of a file?
  • how would you change list to show the difference between files and folders?
  • how could you clean up some of the code by using an enum instead of strings for the commands?
  • how would you use the FileOperator class to test the FileOperator class?

How would you test this code? How are the testing methods different for each class? Which class cannot be easily tested wit unit tests?

Does the code, as is, have any obvious bugs? How would find out?

Why is the Console passed as a parameter to the two constructors?

Summary

This code is meant for you to read and consider how you might do some of these things. You can, of course, attempt any of the suggested changes that you'd like. You need not do so, though, yet, it might be a good activity to do after you've spent some time working on other labs, so that your changes are nice and clean and concise.

javafilemanager's People

Contributors

kristofer 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.