// if you set the sftp path (e.g. /tmp) and also setUserDirIsRoot(opts, true)
// then exceptions are thrown by the sftp impl (bug)!
//SftpFileSystemConfigBuilder.getInstance().setUserDirIsRoot(defaultOpts, true); // null by default.
//Boolean byDef = SftpFileSystemConfigBuilder.getInstance().getUserDirIsRoot(defaultOpts);
StaticUserAuthenticator auth = new StaticUserAuthenticator(null, this.sftpUsername, this.sftpPassword); //domain, user, pass
DefaultFileSystemConfigBuilder.getInstance().setUserAuthenticator(defaultOpts, auth);
FileObject relativeToFO_ = fsManager.resolveFile(sftpUri, defaultOpts);
// cant getAttributes with sftp FS, thus are unable to get home dir !
return relativeToFO_;