mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
FileManagerに普通のファイル読み書きを追加 WIP
This commit is contained in:
1 file changed
+11
-3
@@ -106,17 +106,25 @@ public class FileManagerImpl implements FileManager {
|
||||
|
||||
@Override
|
||||
public void saveFileAtCurrent(File file) {
|
||||
|
||||
try {
|
||||
Files.copy(file.toPath(), currentDir.resolve(file.getName()));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getFile(Path path) {
|
||||
return null;
|
||||
// ファイルを取得する
|
||||
return path.toFile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeFile(Path path) {
|
||||
|
||||
// ファイルを削除する
|
||||
if (path.toFile().exists()) {
|
||||
path.toFile().delete(); // Resultを返す?
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user