FileManagerに普通のファイル読み書きを追加 WIP

This commit is contained in:
r-ca committed 2023-12-25 13:33:28 +09:00
1 parent 92b48336ac
commit 6a98deab83
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を返す?
}
}
}