PyPregeneratedSkeletons (Sdk sdk, int generatorVersion) { final File root = findPregeneratedSkeletonsRoot(); if (root == null || !root.exists()) { return null; } LOG.info("Pregenerated skeletons root is " + root); String prebuiltSkeletonsName = getPregeneratedSkeletonsName(sdk, generatorVersion, Registry .is("python.prebuilt.skeletons.minor.version.aware"), false); if (prebuiltSkeletonsName == null) return null; File f = null; File[] children = root.listFiles(); if (children != null) { for (File file : children) { if (isApplicableZippedSkeletonsFileName(prebuiltSkeletonsName, file.getName())) { f = file; break; } } } if (f != null) { LOG.info("Found pre-generated skeletons at " + f.getPath()); final VirtualFile virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(f); if (virtualFile == null) { LOG.info("Could not find pre-generated skeletons in VFS"); return null; } return new ArchivedSkeletons(JarFileSystem.getInstance().getJarRootForLocalFile(virtualFile)); } else { LOG.info("Not found pre-generated skeletons at " + root); return null; } }