• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package dagger.hilt.android.plugin.util
2 
3 import com.android.SdkConstants
4 import java.io.File
5 import java.util.zip.ZipEntry
6 
7 /* Checks if a file is a .class file. */
isClassFilenull8 fun File.isClassFile() = this.isFile && this.extension == SdkConstants.EXT_CLASS
9 
10 /* Checks if a Zip entry is a .class file. */
11 fun ZipEntry.isClassFile() = !this.isDirectory && this.name.endsWith(SdkConstants.DOT_CLASS)
12 
13 /* CHecks if a file is a .jar file. */
14 fun File.isJarFile() = this.isFile && this.extension == SdkConstants.EXT_JAR
15