mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-30 03:23:16 +00:00
resolve実装
This commit is contained in:
parent
fcda369a2e
commit
d5cf2f31d6
|
@ -5,6 +5,7 @@ import android.graphics.Bitmap;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -26,5 +27,5 @@ public interface FileManager {
|
||||||
|
|
||||||
FileManager setRootDir(Path rootDir);
|
FileManager setRootDir(Path rootDir);
|
||||||
FileManager setPath(Path path);
|
FileManager setPath(Path path);
|
||||||
FileManager resolve(String path);
|
FileManager resolve(String path) throws IOException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,12 +131,13 @@ public class FileManagerImpl implements FileManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FileManager resolve(String path) {
|
public FileManager resolve(String path) throws IOException{
|
||||||
try {
|
try {
|
||||||
this.path = resolveStringPath(path);
|
this.path = resolveStringPath(path);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
logger.error("resolve", e.getMessage());
|
||||||
|
throw new IOException("Invalid path: " + path);
|
||||||
}
|
}
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user