Class LocalFile

All Implemented Interfaces:
AbstractFile

public class LocalFile extends CommonAbstractFile<LocalFileSystem>
  • Method Details

    • getInternalFile

      public File getInternalFile()
    • copyAbstractToLocal

      public void copyAbstractToLocal(File localFile, TransfertObserver observer)
    • sendLocalToAbstract

      public void sendLocalToAbstract(File localFile, TransfertObserver observer)
    • downloadAbstract

      public long downloadAbstract(OutputStream outputStream, int bufferSize, SizedStoppableCopyCallback copyCallback)
      Description copied from interface: AbstractFile
      Only use with a regular file. Type will not be checked before copy action. Never forget to call outputStream.close after download.
      bufferSize - can be used on internal stream transfert, but it's not mandated.
      Returns:
      data size readed from this
    • uploadAbstract

      public long uploadAbstract(InputStream inputStream, int bufferSize, SizedStoppableCopyCallback copyCallback)
      Description copied from interface: AbstractFile
      Only use with a regular file. Type will not be checked before copy action.
      bufferSize - can be used on internal stream transfert, but it's not mandated.
      Returns:
      data size writer to this
    • length

      public long length()
    • exists

      public boolean exists()
    • delete

      public void delete()
      Description copied from interface: AbstractFile
      Not recursive.
    • isDirectory

      public boolean isDirectory()
    • isFile

      public boolean isFile()
    • isLink

      public boolean isLink()
    • isSpecial

      public boolean isSpecial()
    • isHidden

      public boolean isHidden()
      Specified by:
      isHidden in interface AbstractFile
      Overrides:
      isHidden in class CommonAbstractFile<LocalFileSystem>
      Returns:
      marked "hidden" or is a dotfile
    • lastModified

      public long lastModified()
    • list

      public Stream<AbstractFile> list()
    • mkdir

      public void mkdir()
    • renameTo

      public AbstractFile renameTo(String path)
      Returns:
      moved file