|
1 |
| -# FileManager |
| 1 | +# FileManager Documentation |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +## Console's methods |
| 6 | + |
| 7 | +### promptForString |
| 8 | +Takes input and trims/formats it for other methods to take easily. |
| 9 | + |
| 10 | +### sendMessage |
| 11 | +Prints _ to the console |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +## FileManager's methods |
| 16 | + |
| 17 | +### handleUserInput |
| 18 | +Prompts for string. Has special commands for asking for help and inputting nothing- otherwise, hands it off to processCommand. |
| 19 | + |
| 20 | +### processCommand |
| 21 | +A switch statement for the different functionalities implemented in FileOperator. May prompt for additional user input depending on the command. |
| 22 | + |
| 23 | +### renameFile |
| 24 | +Part of processCommand's switch cases. Renames a given file. Covers edge cases for given file not existing. |
| 25 | + |
| 26 | +### performCopyMove |
| 27 | +Part of processCommand's switch cases. Moves a file from one path to another. Covers edge cases for unexpected exceptions. |
| 28 | + |
| 29 | +### sendIntro |
| 30 | +Performed in Console's promptForString when the user asks for help. Prints command options. |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | +## FileOperator's methods |
| 35 | +Most of processCommand's switch cases. |
| 36 | + |
| 37 | +### list |
| 38 | +Lists files in a given folder. Covers edge cases for empty folders and improper paths. |
| 39 | + |
| 40 | +### info |
| 41 | +Prints a given file's name, paths, size, creation date, and mutation date. Covers edge cases for improper paths. |
| 42 | + |
| 43 | +### time |
| 44 | +Prints current day, month, year, hour, minute, and second. |
| 45 | + |
| 46 | +### createDir |
| 47 | +Makes a new folder. Covers edge cases for illegal characters, repeat names, and unexpected exceptions. |
| 48 | + |
| 49 | +### checkForIllegalChars |
| 50 | +Checks input for disallowed characters. |
| 51 | + |
| 52 | +### rename |
| 53 | +Changes a given folder's name. Covers edge cases for repeat names and unexpected exceptions. |
| 54 | + |
| 55 | +### copyCut |
| 56 | +Depending on user input, will either move or copy a given file to a new location. Covers edge cases for unexpected exceptions. |
| 57 | + |
| 58 | +### delete |
| 59 | +Deletes both files and folders of the user's choice. Covers edge cases for given file not existing. |
| 60 | + |
| 61 | +### deleteDir |
| 62 | +Deletes the entire directory. |
| 63 | + |
| 64 | +### copyCutDir |
| 65 | +Cuts out one directory and copies it to a new locations. |
| 66 | + |
| 67 | +### mkDir |
| 68 | +Creates a new directory. |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
2 | 73 |
|
3 |
| -An amazingly useless tool! |
4 | 74 |
|
0 commit comments