ContentEntry (@NotNull ModifiableRootModel model, @NotNull String path) { ContentEntry[] entries = model.getContentEntries(); for (ContentEntry entry : entries) { VirtualFile file = entry.getFile(); if (file != null && ExternalSystemApiUtil.getLocalFileSystemPath(file).equals(path)) { return entry; } } return null; }