Package 

Class FileKt

  • All Implemented Interfaces:

    
    public final class FileKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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
    • Constructor Detail

    • 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

         final static MediaType mediaType(File $self, String mediaTypeHint)

        Sniffs the media type of the file.

        If unknown, fallback on MediaType.BINARY.