mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[dvcs tests] Create file by relative path
This commit is contained in:
@@ -63,13 +63,15 @@ public class Executor {
|
||||
return ourCurrentDir;
|
||||
}
|
||||
|
||||
public static String touch(String fileName) {
|
||||
public static String touch(String filePath) {
|
||||
try {
|
||||
File file = child(fileName);
|
||||
File file = child(filePath);
|
||||
assert !file.exists() : "File " + file + " shouldn't exist yet";
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
new File(file.getParent()).mkdirs(); // ensure to create the directories
|
||||
boolean fileCreated = file.createNewFile();
|
||||
assert fileCreated;
|
||||
log("touch " + fileName);
|
||||
log("touch " + filePath);
|
||||
return file.getPath();
|
||||
}
|
||||
catch (IOException e) {
|
||||
|
||||
Reference in New Issue
Block a user