Package 

Class FileKt

    • Method Summary

      Modifier and Type Method Description
      final static String md5(File $self) Computes the MD5 hash of the file.
      final static Boolean isParentOf(File $self, File other) Returns whether the other is a descendant of this file.
      final static MediaType mediaType(File $self, String mediaTypeHint) Sniffs the media type of the file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • md5

         final static String md5(File $self)

        Computes the MD5 hash of the file.

        Returns null if File is a directory or a file that failed to be read.

      • isParentOf

         final static Boolean isParentOf(File $self, File other)

        Returns whether the other is a descendant of this file.

      • mediaType

        @Deprecated(message = Use an `AssetRetriever` instead to retrieve the format of a file. See the migration guide., level = DeprecationLevel.ERROR) final static MediaType mediaType(File $self, String mediaTypeHint)

        Sniffs the media type of the file.

        If unknown, fallback on MediaType.BINARY.