MyVirtualFile (@NotNull String path) { String normalized = path.replace(File.separatorChar, '/').replace('/', ':'); if (StringUtil.startsWithChar(normalized, ':')) normalized = normalized.substring(1); MyVirtualFile file = myRoot; for (String component : StringUtil.split(normalized, ":")) { file = file.getOrCreate(component); } return file; }