Skip to content

Commit

Permalink
Use nio
Browse files Browse the repository at this point in the history
  • Loading branch information
HaHaWTH committed Mar 10, 2024
1 parent afa3bbe commit 6daabf1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/io/wdsj/asw/method/ExternalWordAllow.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class ExternalWordAllow implements IWordAllow {
private final File dataFolder = new File(AdvancedSensitiveWords.getInstance().getDataFolder(), "/external/allow");
private final File dataFolder = Paths.get(AdvancedSensitiveWords.getInstance().getDataFolder().getPath(),"external","allow").toFile();

@Override
public List<String> allow() {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/io/wdsj/asw/method/ExternalWordDeny.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class ExternalWordDeny implements IWordDeny {
private final File dataFolder = new File(AdvancedSensitiveWords.getInstance().getDataFolder(), "/external/deny");
private final File dataFolder = Paths.get(AdvancedSensitiveWords.getInstance().getDataFolder().getPath(),"external","deny").toFile();

@Override
public List<String> deny() {
Expand Down

0 comments on commit 6daabf1

Please sign in to comment.