Skip to content

Commit

Permalink
Add AnnoyingFile#delete(boolean)
Browse files Browse the repository at this point in the history
  • Loading branch information
srnyx committed Oct 5, 2023
1 parent 13bc27f commit 4619ec3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion api/src/main/java/xyz/srnyx/annoyingapi/file/AnnoyingFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,22 @@ public void load() {

/**
* Deletes the {@link #file}
*
* @param silentFail whether to fail silently
*
* @see #delete()
*/
public void delete(boolean silentFail) {
FileUtility.deleteFile(file.toPath(), silentFail);
}

/**
* Deletes the {@link #file}, won't fail silently
*
* @see #delete(boolean)
*/
public void delete() {
FileUtility.deleteFile(file.toPath(), false);
delete(false);
}

/**
Expand Down

0 comments on commit 4619ec3

Please sign in to comment.