You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
711 B
31 lines
711 B
import java.io.BufferedWriter;
|
|
import java.io.FileWriter;
|
|
import java.io.IOException;
|
|
|
|
public class Storage implements StorageInterface {
|
|
@Override
|
|
public void export() {
|
|
|
|
}
|
|
|
|
@Override
|
|
public void load() {
|
|
|
|
}
|
|
|
|
public boolean writeFile(String path, String content) {
|
|
if (!path.isEmpty() && !content.isEmpty()) {
|
|
try {
|
|
BufferedWriter writer = new BufferedWriter(new FileWriter(path, false));
|
|
writer.append(content);
|
|
writer.close();
|
|
} catch (IOException e) {
|
|
e.printStackTrace();
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|