java.lang.Object
io.vertigo.datastore.impl.filestore.model.FSFile
All Implemented Interfaces:
io.vertigo.core.lang.DataStream, VFile, Serializable

public final class FSFile extends Object
Représentation d'un fichier créé à partir d'un FileSystem.
Author:
npiedeloup
See Also:
  • Constructor Details

    • FSFile

      public FSFile(String fileName, String mimeType, Path file) throws IOException
      Constructor. Associe un fichier à des méta-données
      Parameters:
      fileName - Nom d'origine du fichier
      mimeType - Type mime du fichier
      file - Fichier en lui même (non null)
      Throws:
      IOException - Erreur d'entrée/sortie
  • Method Details

    • getFile

      public Path getFile()
      Returns:
      Fichier en lui même
    • createInputStream

      public InputStream createInputStream() throws IOException
      Throws:
      IOException
    • of

      public static FSFile of(String fileName, String typeMime, Path file)
    • of

      public static FSFile of(Path file)
    • getFileName

      public final String getFileName()
      Specified by:
      getFileName in interface VFile
      Returns:
      Nom d'origine du fichier
    • getMimeType

      public final String getMimeType()
      Specified by:
      getMimeType in interface VFile
      Returns:
      Type mime du fichier
    • getLength

      public final Long getLength()
      Specified by:
      getLength in interface VFile
      Returns:
      Taille du fichier
    • getLastModified

      public final Instant getLastModified()
      Specified by:
      getLastModified in interface VFile
      Returns:
      Date de modification du fichier en milli-secondes.