Class AbstractFileSystemURL

java.lang.Object
tv.hd3g.transfertfiles.AbstractFileSystemURL
All Implemented Interfaces:
Closeable, AutoCloseable

public class AbstractFileSystemURL extends Object implements Closeable
  • Constructor Details

    • AbstractFileSystemURL

      protected AbstractFileSystemURL(String protectedRessourceURL, AbstractFileSystem<?> fileSystem, String basePath)
    • AbstractFileSystemURL

      public AbstractFileSystemURL(String ressourceURL)
      Parameters:
      ressourceURL - like "protocol://user:password@host/basePath?password=secret&active&key=/path/to/privateOpenSSHkey" query must not be encoded use ":password" or "password=" as you want. Never set an "?" in the user:password place. Quotation mark here are ignored (simply used as quotation marks). Never add directly an "&" in the password in query, but you can use " (quotation mark) like password="s&e?c=r+t" key password can be set by... set password - FTP(S|ES) is passive by default. - Add "ignoreInvalidCertificates" to bypass TLS verification with FTPS/FTPES clients. -- Add "timeout=5" for set 5 seconds of connect/socket timeout
  • Method Details

    • toString

      public String toString()
      Passwords will be replaced by "*"
      Overrides:
      toString in class Object
    • getFileSystem

      public AbstractFileSystem<?> getFileSystem()
    • getFromPath

      public AbstractFile getFromPath(String path)
      Parameters:
      relative - path only
      Returns:
      after fileSystem.connect
    • getRootPath

      public AbstractFile getRootPath()
      Returns:
      after fileSystem.connect
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • isReusable

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

      public String getBasePath()