Skip to content

Commit

Permalink
v1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ImplicitSaber committed Jan 16, 2022
1 parent 50164b7 commit 868846c
Show file tree
Hide file tree
Showing 14 changed files with 61 additions and 117 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.javaezlib</groupId>
<artifactId>JavaEZ</artifactId>
<version>1.3</version>
<version>1.4</version>
<description>A simplification library to make Java easier for newcomers.</description>
<name>${project.groupId}:${project.artifactId}</name>
<packaging>jar</packaging>
Expand All @@ -19,9 +19,9 @@
</licenses>
<developers>
<developer>
<name>RedstoneBoy0509</name>
<email>redstoneboy0509@gmail.com</email>
<url>redstoneboy0509.github.io</url>
<name>Red050911</name>
<email>javaezlib@gmail.com</email>
<url>red050911.github.io</url>
<roles>
<role>Main developer</role>
</roles>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/github/javaezlib/javaez/JavaEZ.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class JavaEZ {
* The current version of JavaEZ.
* @since 1.1
*/
public static final String VERSION = "1.3";
public static final String VERSION = "1.4";

/**
* Prints info about your version of JavaEZ
Expand Down Expand Up @@ -55,7 +55,7 @@ public static String getLatestVersion() {
*/
public static List<String> getVersions() {
try {
URL url = new URL("https://gist.githubusercontent.com/RedstoneBoy0509/fb10258f9ae7d858f94b8cbaa651548f/raw/");
URL url = new URL("https://gist.githubusercontent.com/Red050911/fb10258f9ae7d858f94b8cbaa651548f/raw/");
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
List<String> list = new ArrayList<>();
String line;
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/io/github/javaezlib/javaez/JavaEZ.java.asc

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions src/main/java/io/github/javaezlib/javaez/extensions/Core.java.asc

This file was deleted.

54 changes: 54 additions & 0 deletions src/main/java/io/github/javaezlib/javaez/extensions/Files.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,58 @@ public static void writeLine(String line) {
}
}

/**
* Makes a file
* @param path Where to create this file
* @since 1.4
*/
public static void makeFile(String path) {
File file = new File(path);
if(file.exists()) {
ErrorSystem.handleError("This file already exists! Maybe a folder is there with the same name?");
} else {
try {
if(!file.createNewFile()) ErrorSystem.handleError("We couldn't create the file. Maybe the path was wrong?");
} catch (Exception e) {
ErrorSystem.handleError("We couldn't create the file. Maybe the path was wrong?");
}
}
}

/**
* Makes a folder
* @param path Where to create this file
* @since 1.4
*/
public static void makeFolder(String path) {
File file = new File(path);
if(file.exists()) {
ErrorSystem.handleError("This folder already exists! Maybe a file is there with the same name?");
} else {
try {
if(!file.mkdirs()) ErrorSystem.handleError("We couldn't create the folder. Maybe the path was wrong?");
} catch (Exception e) {
ErrorSystem.handleError("We couldn't create the folder. Maybe the path was wrong?");
}
}
}

/**
* Trashes a file or folder.
* @param path Path of the file to trash
* @since 1.4
*/
public static void trashFile(String path) {
File file = new File(path);
if(!file.exists()) {
ErrorSystem.handleError("The file/folder doesn't exist.");
} else {
try {
if(!file.delete()) ErrorSystem.handleError("We couldn't trash the file/folder. Maybe the path was wrong?");
} catch (Exception ex) {
ErrorSystem.handleError("We couldn't trash the file/folder. Maybe the path was wrong?");
}
}
}

}
11 changes: 0 additions & 11 deletions src/main/java/io/github/javaezlib/javaez/extensions/Files.java.asc

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static String whoIsUsingThePC() {
*/
public static void lockMyPC() {
if(!whatsMyOS().toLowerCase().contains("win")) {
ErrorSystem.handleError("You are not on Windows!");
ErrorSystem.handleError("You are not on Windows! PCs can only be locked on Windows.");
return;
}
try {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions src/main/java/io/github/javaezlib/javaez/package-info.java.asc

This file was deleted.

0 comments on commit 868846c

Please sign in to comment.