Class FileMagic

java.lang.Object
org.applecommander.util.FileMagic

public class FileMagic extends Object
Provide some shared file identification across FileStores.
  • Field Details

  • Constructor Details

    • FileMagic

      public FileMagic()
  • Method Details

    • getProdosFileTypeText

      public static String getProdosFileTypeText(int fileType, int auxType)
      Given a prodos file_type and aux_type, identify the 3-letter abbreviation to use.
    • getProdosContentType

      public static ContentType getProdosContentType(int fileType, int auxType)
      Given a prodos file_type and aux_type, identify the content type it represents.
    • identifyContentType

      public static ContentType identifyContentType(String fileName)
      Given a filename, try to identify the content type.
    • findProdosFileType

      public static Optional<FileMagic.FileTypeSummary> findProdosFileType(int fileType, int auxType)
      Filter through the ProDOS metadata and generate a file type summary using the aux_type as primary and then falling back to the ProDOS file_type.