VirtualFile[] (ContentFolder[] sourceFolders) { ArrayList<VirtualFile> result = new ArrayList<>(sourceFolders.length); for (ContentFolder sourceFolder : sourceFolders) { final VirtualFile file = sourceFolder.getFile(); if (file != null) { result.add(file); } } return VfsUtilCore.toVirtualFileArray(result); }