mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
ファイルマネージャにメソッド追加, 微修正
This commit is contained in:
parent
5a0b215626
commit
0fade2c41b
|
@ -82,13 +82,12 @@ public class FileManagerImpl implements FileManager {
|
|||
//ディレクトリ作成
|
||||
logger.debug("createDir", "called");
|
||||
|
||||
Path dir = currentDir.resolve(dirName);
|
||||
if (!Files.exists(dir)) {
|
||||
try {
|
||||
Files.createDirectories(dir);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Path path = currentDir.resolve(dirName);
|
||||
logger.debug("createDir", "path: " + path);
|
||||
try {
|
||||
Files.createDirectory(path);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -110,6 +109,24 @@ public class FileManagerImpl implements FileManager {
|
|||
currentDir.resolve(fileName).toFile().delete(); // TODO-rca: エラーハンドリング
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExist(Path path) {
|
||||
logger.debug("isExist", "called");
|
||||
return Files.exists(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void autoCreateDir(Path path) {
|
||||
logger.debug("autoCreateDir", "called");
|
||||
if (!Files.exists(path)) {
|
||||
try {
|
||||
Files.createDirectories(path);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void saveBitmapAtCurrent(Bitmap bitmap, String fileName) { // TODO-rca: ファイル形式を変更できるようにする?
|
||||
|
|
Loading…
Reference in New Issue
Block a user