feat(ui): supports adding or removing breakpoint on debug

This commit is contained in:
hyb1996
2018-09-08 20:22:26 +08:00
parent 031fc56131
commit 94a17c3118
7 changed files with 75 additions and 19 deletions

View File

@@ -37,7 +37,8 @@ public class Files {
}
f = new File(f, path);
}
return f.getPath();
String path = f.getPath();
return relativePath.endsWith(File.separator) ? path + "/" : path;
}
public String cwd() {
@@ -89,7 +90,7 @@ public class Files {
return PFiles.read(path(path));
}
public String readAssets(String path, String encoding){
public String readAssets(String path, String encoding) {
try {
return PFiles.read(mRuntime.getUiHandler().getContext().getAssets().open(path), encoding);
} catch (IOException e) {
@@ -97,11 +98,11 @@ public class Files {
}
}
public String readAssets(String path){
public String readAssets(String path) {
return readAssets(path, "UTF-8");
}
public byte[] readBytes(String path){
public byte[] readBytes(String path) {
return PFiles.readBytes(path(path));
}