public UnixSshPath resolve()

in src/main/java/com/pastdev/jsch/nio/file/UnixSshPath.java [296:317]


    public UnixSshPath resolve( Path other ) {
        if ( other.isAbsolute() ) {
            if ( other instanceof UnixSshPath ) {
                return (UnixSshPath) other;
            }
            else {
                return new UnixSshPath( getFileSystem(), other.toString() );
            }
        }
        else if ( other.getNameCount() == 0 ) {
            return this;
        }

        int count = other.getNameCount();
        String[] combined = new String[parts.length + count];
        System.arraycopy( parts, 0, combined, 0, parts.length );
        int index = parts.length;
        for ( Path otherPart : other ) {
            combined[index++] = otherPart.toString();
        }
        return new UnixSshPath( getFileSystem(), isAbsolute(), combined );
    }