forked from ZipCodeCore/JavaFileManager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelpForFileManager
More file actions
87 lines (61 loc) · 3.02 KB
/
HelpForFileManager
File metadata and controls
87 lines (61 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Help for File Manager
## Class Descriptions
- **FileManager**: asdf
-**FileOperator**: asdf
-**Console**: Prompts user for String. Saves entered String to a variable. Makes String lowercase and trims whitespace. Returns formatted String
## Commands in FileManager class
-list:
-info:
-mkdir:
-rename:
-copy:
-move:
-delete:
-quit:
## Commands in FileOperator class
## Commands in Console class
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](FileManager.md) file describing how you use
each of the commands the program provides.
You can use [Mastering Markdown](https://guides.github.com/features/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](https://en.wikipedia.org/wiki/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](FileManager.md) 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.