From 9edcc0a3ee21108a014d4efa600641c354c61038 Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Sun, 28 Feb 2021 18:25:19 -0500 Subject: [PATCH 1/9] Made some updates --- .idea/JavaFileManager.iml | 2 ++ .idea/compiler.xml | 1 + .idea/misc.xml | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .idea/JavaFileManager.iml diff --git a/.idea/JavaFileManager.iml b/.idea/JavaFileManager.iml new file mode 100644 index 0000000..78b2cc5 --- /dev/null +++ b/.idea/JavaFileManager.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 3f507c9..29fac82 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -7,6 +7,7 @@ + diff --git a/.idea/misc.xml b/.idea/misc.xml index accd629..132404b 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -8,7 +8,7 @@ - + \ No newline at end of file From d7c5bfc9b68e7e20efd5713a94dd73f8f3b3f7b8 Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Sun, 28 Feb 2021 18:28:03 -0500 Subject: [PATCH 2/9] Created HelpForFileManager.md --- HelpForFileManager | 87 +++++++++++++++++++++++++++++++++++++++++ HelpForFileManager.md | 91 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 178 insertions(+) create mode 100644 HelpForFileManager create mode 100644 HelpForFileManager.md diff --git a/HelpForFileManager b/HelpForFileManager new file mode 100644 index 0000000..2bf2a5d --- /dev/null +++ b/HelpForFileManager @@ -0,0 +1,87 @@ +# 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. + diff --git a/HelpForFileManager.md b/HelpForFileManager.md new file mode 100644 index 0000000..43473ba --- /dev/null +++ b/HelpForFileManager.md @@ -0,0 +1,91 @@ +# 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 + +Create object of type FileOperator.( Must pass console object in as a paramter). +`FileOperator myFileOperator = new FileOperator(myConsole);` + +-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. + From d229f37d1ea84db84dea23f5853ec61ed65dec8d Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Sun, 28 Feb 2021 18:37:33 -0500 Subject: [PATCH 3/9] Removed extra info from HelpForFileManager.md --- HelpForFileManager.md | 72 ++----------------------------------------- 1 file changed, 2 insertions(+), 70 deletions(-) diff --git a/HelpForFileManager.md b/HelpForFileManager.md index 43473ba..a410908 100644 --- a/HelpForFileManager.md +++ b/HelpForFileManager.md @@ -3,14 +3,13 @@ ## 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 -Create object of type FileOperator.( Must pass console object in as a paramter). +Create object of type FileOperator.(Must pass console object in as a parameter). + `FileOperator myFileOperator = new FileOperator(myConsole);` -list: @@ -22,70 +21,3 @@ Create object of type FileOperator.( Must pass console object in as a paramter). -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. - From deaea9a191794d7356981df608b610028bcb583e Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Sun, 28 Feb 2021 18:39:15 -0500 Subject: [PATCH 4/9] Made more modifications --- .DS_Store | Bin 0 -> 6148 bytes HelpForFileManager.md | 20 ++++++++++---------- src/.DS_Store | Bin 0 -> 6148 bytes src/main/.DS_Store | Bin 0 -> 6148 bytes src/main/java/String.java | 2 ++ test/.DS_Store | Bin 0 -> 6148 bytes 6 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 .DS_Store create mode 100644 src/.DS_Store create mode 100644 src/main/.DS_Store create mode 100644 src/main/java/String.java create mode 100644 test/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..c6caaf4bf0e2c3cbb068c1c57802a525170d8c0a GIT binary patch literal 6148 zcmeHKF>V4u4739UQX0yX`-S{qg~$u|01D6{AqCQ3m3QT7nXwHDI$e>1CK^lj?D{;n zx+%_UGxOEw{?%-0W(zpcz8J>F=k$?1Rfgz%$L{!kIvugJ`KWjzLGH}X_F=pI`8WS! z2c$38NR3`(vfdf*9(Wlq?^adcu$?|HKBN%j(m%9^PZ?E1*E{e z0<+vM+5g|*6Z8K)NjoVZ1^$%+K3{LvD|}M**3rkY*EaYT&YEvH4eOvFL^}pXJI03X e_$7+6u5pd$y>LhjI`TmW>M}rGWK!VK3j6>xzZb*+ literal 0 HcmV?d00001 diff --git a/HelpForFileManager.md b/HelpForFileManager.md index a410908..9f5386d 100644 --- a/HelpForFileManager.md +++ b/HelpForFileManager.md @@ -3,8 +3,8 @@ ## 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 +- **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 @@ -12,12 +12,12 @@ Create object of type FileOperator.(Must pass console object in as a parameter). `FileOperator myFileOperator = new FileOperator(myConsole);` --list: --info: --mkdir: --rename: --copy: --move: --delete: --quit: +- list: +- info: +- mkdir: +- rename: +- copy: +- move: +- delete: +- quit: diff --git a/src/.DS_Store b/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..7b0d36729e2ee777a660f9e8c6709dd97bc2fb68 GIT binary patch literal 6148 zcmeH~F>V4u3`M`g7D#EfOgRk)$PGpaPQV2S&>%r5BKkQx-ySzvsH0W%E!l7ES!;KH zv9ktX>-*^w7y&HlPOLmk%$N_j;tOYdpMH*)!|itQBJHgMp3+B5_H$d10#ZNMM4T9irw zDe%t}uwk>?toc%Twm!X{*Y{cVb)%DUIm54?049DEf6&9YUwlE)m< zk%er^j=Knh3!DIf); zz>E~gV|@8Jqi52iNC7D@4+Z@DQ0UH@Y@PAxV2BZb99RzHI%Wy7c!8|R*2xOZa(b|A zwHQOZ9_?hw>uR!f_I6kfAC`AEpJHg%+hK(X&1yhF3P^#80*juHe*W+1ujcQ^n8@Auu4PPqH)~DC=`aY|^Zges(XZZ6Iz{HQ@6+Mjm#TR5vwoX=P`Vj~j6r{kv GD)0dNyb`AX literal 0 HcmV?d00001 diff --git a/src/main/java/String.java b/src/main/java/String.java new file mode 100644 index 0000000..a5a1178 --- /dev/null +++ b/src/main/java/String.java @@ -0,0 +1,2 @@ +public class String { +} diff --git a/test/.DS_Store b/test/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f0d56391b104dea5cd675b9c03f72ce3b1fa90de GIT binary patch literal 6148 zcmeHKF=_)r43uIQhBPiy?ic)n#W*kU2g1dT;jjyn{;IqyPs@xXg3WP7iZo#a((KJj zyWA9~lbQMcb)ai2c3r(%fCGv3GHdL6N})hu~|VC~8VJKN=SyRRQX z4foW-0ivaV6p#W^Knh5KUn#&w4cj~?DoOz#PBQ!-zu*cPKjA=9yjBhy4h<&@wgp)i*)mzs3--bz@q{+ zq;J{(U*QY$|6`G!q<|FoR|@$0a6IhsO4VCuFUMZn;BRo|e8Fj0M+ri-V_>vnJg^r^F}+ALT&(3{V%D6!>cez5zp>7b^e& literal 0 HcmV?d00001 From d284d2524691d93d73b90696442c583756b467cb Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Sun, 28 Feb 2021 18:46:16 -0500 Subject: [PATCH 5/9] Changes --- HelpForFileManager.md | 7 ++++--- src/main/java/FileOperator.java | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/HelpForFileManager.md b/HelpForFileManager.md index 9f5386d..3c959b5 100644 --- a/HelpForFileManager.md +++ b/HelpForFileManager.md @@ -4,15 +4,16 @@ ## 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 +- **Console**: Prompts user for String. Saves entered String to a variable. Makes String lowercase and trims whitespace. Returns formatted String. ## Commands in FileManager class Create object of type FileOperator.(Must pass console object in as a parameter). - `FileOperator myFileOperator = new FileOperator(myConsole);` -- list: +- list: Prompts user to enter folder path. Checks whether path exists and is a directory. Returns string of file names if the folder is not empty. +`myFileOperator.list(myFolderPath);` + - info: - mkdir: - rename: diff --git a/src/main/java/FileOperator.java b/src/main/java/FileOperator.java index 4148e8e..2970958 100644 --- a/src/main/java/FileOperator.java +++ b/src/main/java/FileOperator.java @@ -26,8 +26,8 @@ public void list(String path){ if(path1.exists() && path1.isDirectory()){ String[] lista = path1.list(); if(lista.length == 0){ - cons.sendMessage("Folder is empty."); - } else { + cons.sendMessage("Folder is empty."); } + else { for (String s : lista) { cons.sendMessage(s); } From 680b1600f55ba81d320ff3fbea8c3ff0fdec215b Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Sun, 28 Feb 2021 18:56:26 -0500 Subject: [PATCH 6/9] Updated several commands --- HelpForFileManager.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/HelpForFileManager.md b/HelpForFileManager.md index 3c959b5..b5ddc4e 100644 --- a/HelpForFileManager.md +++ b/HelpForFileManager.md @@ -12,13 +12,24 @@ Create object of type FileOperator.(Must pass console object in as a parameter). `FileOperator myFileOperator = new FileOperator(myConsole);` - list: Prompts user to enter folder path. Checks whether path exists and is a directory. Returns string of file names if the folder is not empty. -`myFileOperator.list(myFolderPath);` +`myFileOperator.list("Desktop/Projects/);` + +- info: Prompts user for file/folder path. Returns name, absolute path, relative path, and size of file/folder. +`myFileOperator.info(Desktop/Projects/myFile.txt");` + +- mkdir: Prompts user for new folder path. Makes sure a folder with same name does not already exist. Makes sure folder name is appropriate. Creates new folder. +`myFileOperator.mkdir(Desktop/Projects/myNewFolder");` + +- rename: Renames file. +`myFileOperator.rename(myFile.txt,myRenamedFile.txt);` -- info: -- mkdir: -- rename: - copy: + - move: -- delete: -- quit: + +- delete:Prompts user for path of file/folder they want to delete. Checks if file/folder exists and then deletes file/folder. +`myFileOperator.delete("Desktop/Projects/myRenamedFile.txt");` + +- quit: Ends program. +`myFileOperator.quit(); From 865f00df15a0952a6a05bf3f4d19c33fb8ad66b4 Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Sun, 28 Feb 2021 19:02:09 -0500 Subject: [PATCH 7/9] Upated last commands --- HelpForFileManager.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/HelpForFileManager.md b/HelpForFileManager.md index b5ddc4e..c838be0 100644 --- a/HelpForFileManager.md +++ b/HelpForFileManager.md @@ -11,23 +11,25 @@ Create object of type FileOperator.(Must pass console object in as a parameter). `FileOperator myFileOperator = new FileOperator(myConsole);` -- list: Prompts user to enter folder path. Checks whether path exists and is a directory. Returns string of file names if the folder is not empty. +- *list*: Prompts user to enter folder path. Checks whether path exists and is a directory. Returns string of file names if the folder is not empty. `myFileOperator.list("Desktop/Projects/);` -- info: Prompts user for file/folder path. Returns name, absolute path, relative path, and size of file/folder. +- *info*: Prompts user for file/folder path. Returns name, absolute path, relative path, and size of file/folder. `myFileOperator.info(Desktop/Projects/myFile.txt");` -- mkdir: Prompts user for new folder path. Makes sure a folder with same name does not already exist. Makes sure folder name is appropriate. Creates new folder. +- *mkdir*: Prompts user for new folder path. Makes sure a folder with same name does not already exist. Makes sure folder name is appropriate. Creates new folder. `myFileOperator.mkdir(Desktop/Projects/myNewFolder");` -- rename: Renames file. +- *rename*: Prompts user for path of file/folder to rename. Renames file/folder if it exists. `myFileOperator.rename(myFile.txt,myRenamedFile.txt);` -- copy: +- *copy*: Prompts user for file/folder to copy. Copies that file/folder if it exists. +`myFileOperator.copy("Desktop/Projects/myFile.txt"); -- move: +- *move*:Prompts user for path of file/folder to copy and move and destination path. Moves the file/folder. +`myFileOperator.move("Desktop/Projects/myFile.txt,Desktop/");` -- delete:Prompts user for path of file/folder they want to delete. Checks if file/folder exists and then deletes file/folder. +- *delete*:Prompts user for path of file/folder they want to delete. Checks if file/folder exists and then deletes file/folder. `myFileOperator.delete("Desktop/Projects/myRenamedFile.txt");` - quit: Ends program. From e340606c90c3cdddc66116e38f33452996c6f054 Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Sun, 28 Feb 2021 19:05:55 -0500 Subject: [PATCH 8/9] Added line break --- HelpForFileManager.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/HelpForFileManager.md b/HelpForFileManager.md index c838be0..4a33502 100644 --- a/HelpForFileManager.md +++ b/HelpForFileManager.md @@ -8,30 +8,30 @@ ## Commands in FileManager class -Create object of type FileOperator.(Must pass console object in as a parameter). +Create object of type FileOperator.(Must pass console object in as a parameter).\ `FileOperator myFileOperator = new FileOperator(myConsole);` -- *list*: Prompts user to enter folder path. Checks whether path exists and is a directory. Returns string of file names if the folder is not empty. +- *list*: Prompts user to enter folder path. Checks whether path exists and is a directory. Returns string of file names if the folder is not empty.\ `myFileOperator.list("Desktop/Projects/);` -- *info*: Prompts user for file/folder path. Returns name, absolute path, relative path, and size of file/folder. +- *info*: Prompts user for file/folder path. Returns name, absolute path, relative path, and size of file/folder.\ `myFileOperator.info(Desktop/Projects/myFile.txt");` -- *mkdir*: Prompts user for new folder path. Makes sure a folder with same name does not already exist. Makes sure folder name is appropriate. Creates new folder. +- *mkdir*: Prompts user for new folder path. Makes sure a folder with same name does not already exist. Makes sure folder name is appropriate. Creates new folder.\ `myFileOperator.mkdir(Desktop/Projects/myNewFolder");` -- *rename*: Prompts user for path of file/folder to rename. Renames file/folder if it exists. +- *rename*: Prompts user for path of file/folder to rename. Renames file/folder if it exists.\ `myFileOperator.rename(myFile.txt,myRenamedFile.txt);` -- *copy*: Prompts user for file/folder to copy. Copies that file/folder if it exists. +- *copy*: Prompts user for file/folder to copy. Copies that file/folder if it exists.\ `myFileOperator.copy("Desktop/Projects/myFile.txt"); -- *move*:Prompts user for path of file/folder to copy and move and destination path. Moves the file/folder. +- *move*:Prompts user for path of file/folder to copy and move and destination path. Moves the file/folder.\ `myFileOperator.move("Desktop/Projects/myFile.txt,Desktop/");` -- *delete*:Prompts user for path of file/folder they want to delete. Checks if file/folder exists and then deletes file/folder. +- *delete*:Prompts user for path of file/folder they want to delete. Checks if file/folder exists and then deletes file/folder.\ `myFileOperator.delete("Desktop/Projects/myRenamedFile.txt");` -- quit: Ends program. +- *quit*: Ends program.\ `myFileOperator.quit(); From b184e439f2fe722d88a38e9eff2db2f2351f42e2 Mon Sep 17 00:00:00 2001 From: Chris Allen Date: Sun, 28 Feb 2021 19:13:12 -0500 Subject: [PATCH 9/9] Did some reformatting and added class descriptions --- HelpForFileManager.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/HelpForFileManager.md b/HelpForFileManager.md index 4a33502..9b22bb6 100644 --- a/HelpForFileManager.md +++ b/HelpForFileManager.md @@ -2,13 +2,13 @@ ## 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. +- **FileManager**: Prompts user for a command. Processes the command if the command is valid. +- **FileOperator**: Used to create FileOperator object. Methods are commands used for file management. +- **Console**: Used to create Console object that prompts user for String, saves the entered String to a variable, makes the String lowercase, trims whitespace, and returns the formatted String. ## Commands in FileManager class -Create object of type FileOperator.(Must pass console object in as a parameter).\ +Create object of type FileOperator by passing in a Console object.\ `FileOperator myFileOperator = new FileOperator(myConsole);` - *list*: Prompts user to enter folder path. Checks whether path exists and is a directory. Returns string of file names if the folder is not empty.\ @@ -24,7 +24,7 @@ Create object of type FileOperator.(Must pass console object in as a parameter). `myFileOperator.rename(myFile.txt,myRenamedFile.txt);` - *copy*: Prompts user for file/folder to copy. Copies that file/folder if it exists.\ -`myFileOperator.copy("Desktop/Projects/myFile.txt"); +`myFileOperator.copy("Desktop/Projects/myFile.txt");` - *move*:Prompts user for path of file/folder to copy and move and destination path. Moves the file/folder.\ `myFileOperator.move("Desktop/Projects/myFile.txt,Desktop/");` @@ -33,5 +33,5 @@ Create object of type FileOperator.(Must pass console object in as a parameter). `myFileOperator.delete("Desktop/Projects/myRenamedFile.txt");` - *quit*: Ends program.\ -`myFileOperator.quit(); +`myFileOperator.quit();`