VirtualFile (@NotNull String path) { String[] dirNames = path.split("/"); VirtualFile baseDir = PlatformTestUtil.getOrCreateProjectBaseDir(getProject()); for (int i = 0; i < dirNames.length - 1; i++) { VirtualFile existing = VfsUtilCore.findRelativeFile(dirNames[i], baseDir); if (existing == null) { baseDir = createChildDirectory(baseDir, dirNames[i]); } else { baseDir = existing; } } String last = dirNames[dirNames.length - 1]; return path.endsWith("/") ? createChildDirectory(baseDir, last) : createChildData(baseDir, last); }