Skip to content

Commit

Permalink
Removed Directories from Fileserver, Changed Logofile
Browse files Browse the repository at this point in the history
  • Loading branch information
CommandJoo committed Oct 29, 2023
1 parent 9deb205 commit 263cacb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ConsoleTools
###### by Command Jo
<br><br>

ConsoleTools is a CLI that has a collection of useful tools
for various things in the console.

Expand All @@ -10,8 +10,14 @@ TO BE ADDED

# Functionality
1. Launch the app
2. It will tell you that ```to get started type "?"```
3. This will show you all the information you need to work
```bash
java -jar ConsoleTools.jar
```
2. It will then tell you that
```text
to get started type "?"
```
3. Doing this will show you the Helpscreen


# Modules
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/de/jo/web/FileServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ public void addFile(File file) {
* @param file The parameter "file" is of type File and represents the directory that you want to add to the server.
*/
public void addDirectory(File file) {
this.files.addAll(Arrays.asList(Objects.requireNonNull(file.listFiles())));
for(File subfile : Objects.requireNonNull(file.listFiles())) {
if(!subfile.isDirectory()) this.files.add(subfile);
}
System.out.println(ConsoleColors.YELLOW_BRIGHT+"---------------------------------");
System.out.println(ConsoleColors.YELLOW+"> "+ConsoleColors.YELLOW_BRIGHT+"Added Directory to Server: "+file.getName());
System.out.println(ConsoleColors.YELLOW_BRIGHT+"---------------------------------");
Expand Down
6 changes: 4 additions & 2 deletions src/main/resources/logo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
| \ \_______\ \ \__\ \ \_______\ \ \_______\ \ \_______\ |\_________\ |
| \|________| \|__| \|_______| \|_______| \|_______| \|_________| |
| |
| |
| to get started type "?" |
| ConsoleTools by Johannes Hans @CommandJoo |
| Version 1.0.5 |
| https://github.com/CommandJoo/ConsoleTools |
| to get started type "?" |
| |
| |
|---------------------------------------------------------------------------------------------------------------------|

0 comments on commit 263cacb

Please sign in to comment.