Interface AbstractFileSystem<T extends AbstractFile>

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
CommonAbstractFileSystem, FTPESFileSystem, FTPFileSystem, FTPSFileSystem, LocalFileSystem, SFTPFileSystem

public interface AbstractFileSystem<T extends AbstractFile> extends Closeable
Expected to be thread safe. Don't forget to implements hashCode, equals and toString.
  • Method Details

    • connect

      void connect()
    • getFromPath

      T getFromPath(String path)
      Parameters:
      path - relative path only
    • getFromPath

      default T getFromPath(String path0, String... pathN)
      Parameters:
      path - relative path only
    • getIOBufferSize

      default int getIOBufferSize()
      65535 bytes
    • setTimeout

      default void setTimeout(long duration, TimeUnit unit)
      Set socket/connection timeout.
    • isReusable

      boolean isReusable()
      If disconnected, can we re-connect after ?
    • isAvaliable

      boolean isAvaliable()
    • reusableHashCode

      int reusableHashCode()
      Returns:
      the same code for the same internal engine instance in FileSystem. Can be used for interract two FS and protect the both are not the same.
    • getHost

      InetAddress getHost()
    • getUsername

      String getUsername()