public interface File<T>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns map of attributes associated with the file.
    The content of the file.
    static String
     
    default List<String>
    Return entries of the file - depending on the type of file it can be populated or empty list
    Returns name of the file including extension if defined
    default String
    Returns type of the file that defines how to handle the content.
    url()
    Returns url representing this file based on the type and content
  • Field Details

  • Method Details

    • name

      String name()
      Returns name of the file including extension if defined
      Returns:
      full file name
    • type

      default String type()
      Returns type of the file that defines how to handle the content. It's expected to return MIME type based on the actual content of the file.
      Returns:
      MIME type that represents this file
    • content

      T content()
      The content of the file.
      Returns:
      complete content of the file
    • attributes

      Map<String,String> attributes()
      Returns map of attributes associated with the file. Additional attributes can be set at any time such as last modification date, etc
      Returns:
      non null map of attributes
    • url

      String url()
      Returns url representing this file based on the type and content
      Returns:
      url of the file
    • entries

      default List<String> entries()
      Return entries of the file - depending on the type of file it can be populated or empty list
      Returns:
      found entries in the file
    • discoverType

      static String discoverType(String name)