public String toRemote ( final String host , final File localFile ) { if ( this . remoteName != null && ( this . hosts == null || this . hosts . contains ( host ) ) ) { try { final String canonical = localFile . getCanonicalPath ( ) ; if ( canonical . startsWith ( this . canonicalPath ) && isActive ( ) ) { return this . remoteName + canonical . substring ( this . canonicalPath . length ( ) ) . replace ( File . separatorChar , this . remoteSeparator ) ; } } catch ( final IOException ex ) { return null ; } } return null ; }
Converts the local file name to the remote name for the same file .