src/java/fr/jayasoft/ivy/repository/ssh/SshRepository.java
/**
     * check for existence of file or dir on target system
     * @param filePath to the object to check
     * @param session to use
     * @return true: object exists, false otherwise
     */
check for existence of file or dir on target system
@param filePath to the object to check
@param session to use
@return true: object exists, false otherwise
check for existence of file or dir on target system @param filePath to the object to check @param session to use @return true : object exists false otherwise
private boolean checkExistence(String filePath, Session session) throws IOException {
        Message.debug("SShRepository: checkExistence called: " + filePath);
        ChannelExec channel = null;
        channel = getExecChannel(session);
        String fullCmd = replaceArgument( existCommand, filePath);
        channel.setCommand(fullCmd);
        StringBuffer stdOut = new StringBuffer();
        StringBuffer stdErr = new StringBuffer();
        readSessionOutput(channel,stdOut,stdErr);
        return channel.getExitStatus() == 0;
    }
private boolean checkExistence ( String filePath , Session session ) throws IOException { Message . debug ( "SShRepository: checkExistence called: " + filePath ) ; ChannelExec channel = null ; channel = getExecChannel ( session ) ; String fullCmd = replaceArgument ( existCommand , filePath ) ; channel . setCommand ( fullCmd ) ; StringBuffer stdOut = new StringBuffer ( ) ; StringBuffer stdErr = new StringBuffer ( ) ; readSessionOutput ( channel , stdOut , stdErr ) ; return channel . getExitStatus ( ) == 0 ; }
check for existence of file or dir on target system
 @param filePath to the object to check
 @param session to use
 @return true: object exists, false otherwise
check for existence of file or dir on target system @param filePath to the object to check @param session to use @return true : object exists false otherwise