Type (@Nullable VirtualFile file) { if (file == null) return Type.FILE; if (file.getFileType() instanceof ArchiveFileType) return Type.ARCHIVE; if (file.isDirectory()) return Type.DIRECTORY; return Type.FILE; }