String (@Nullable String basePath, @NotNull File workingDir) { if (basePath != null) { String relPath = FileUtil.getRelativePath(basePath, FileUtil.toSystemIndependentName(workingDir.getPath()), '/'); if (".".equals(relPath)) { return workingDir.getName(); } else if (relPath != null) { return FileUtil.toSystemDependentName(relPath); } } return workingDir.getPath(); }