File (@DialogTitle String title, @Label String description) { FileChooserDescriptor fcd = FileChooserDescriptorFactory.createSingleFolderDescriptor(); fcd.setShowFileSystemRoots(true); fcd.setTitle(title); fcd.setDescription(description); fcd.setHideIgnored(false); VirtualFile file = FileChooser.chooseFile(fcd, myProject, null); if (file == null) { return null; } final String path = file.getPath(); if (path.endsWith(":")) { // workaround for VFS oddities with drive root (IDEADEV-20870) return new File(path + "/"); } return new File(path); }