lib/src/main/java/edu/utexas/tacc/tapis/files/lib/clients/SSHDataClient.java
@Override
    public void mkdir(@NotNull String remotePath) throws IOException {
        remotePath = FilenameUtils.normalize(remotePath);
        Path remote = Paths.get(rootDir, remotePath);
        Path rootDirPath = Paths.get(rootDir);
        Path relativePath = rootDirPath.relativize(remote);
        SSHSftpClient sftpClient = connectionHolder.getSftpClient();
        try {

            Path tmpPath = Paths.get(rootDir);
            for (Path part: relativePath) {
                tmpPath = tmpPath.resolve(part);
                try {
                    sftpClient.mkdir(tmpPath.toString());
                } catch (SftpException ignored) {}
            }
        } catch (IOException e) {
            if (e.getMessage().toLowerCase().contains("no such file")) {
                String msg = Utils.getMsg("FILES_CLIENT_SSH_NOT_FOUND", oboTenant, oboUser, systemId, username, host, remotePath);
                throw new NotFoundException(msg);
            } else {
                String msg = Utils.getMsg("FILES_CLIENT_SSH_OP_ERR1", oboTenant, oboUser, "mkdir", systemId, username, host, remotePath, e.getMessage());
                throw new IOException(msg, e);
            }
        } finally {
            sftpClient.close();
            connectionHolder.returnSftpClient(sftpClient);
        }
    }
/**
     * Creates a directory on a remotePath relative to rootDir
     *
     * @throws IOException
     */
Creates a directory on a remotePath relative to rootDir
@throws IOException
Creates a directory on a remotePath relative to rootDir @throws IOException
@Override
    public void mkdir(@NotNull String remotePath) throws IOException {
        remotePath = FilenameUtils.normalize(remotePath);
        Path remote = Paths.get(rootDir, remotePath);
        Path rootDirPath = Paths.get(rootDir);
        Path relativePath = rootDirPath.relativize(remote);
        SSHSftpClient sftpClient = connectionHolder.getSftpClient();
        try {
            Path tmpPath = Paths.get(rootDir);
            for (Path part: relativePath) {
                tmpPath = tmpPath.resolve(part);
                try {
                    sftpClient.mkdir(tmpPath.toString());
                } catch (SftpException ignored) {}
            }
        } catch (IOException e) {
            if (e.getMessage().toLowerCase().contains("no such file")) {
                String msg = Utils.getMsg("FILES_CLIENT_SSH_NOT_FOUND", oboTenant, oboUser, systemId, username, host, remotePath);
                throw new NotFoundException(msg);
            } else {
                String msg = Utils.getMsg("FILES_CLIENT_SSH_OP_ERR1", oboTenant, oboUser, "mkdir", systemId, username, host, remotePath, e.getMessage());
                throw new IOException(msg, e);
            }
        } finally {
            sftpClient.close();
            connectionHolder.returnSftpClient(sftpClient);
        }
    }
@ Override public void mkdir ( @ NotNull String remotePath ) throws IOException { remotePath = FilenameUtils . normalize ( remotePath ) ; Path remote = Paths . get ( rootDir , remotePath ) ; Path rootDirPath = Paths . get ( rootDir ) ; Path relativePath = rootDirPath . relativize ( remote ) ; SSHSftpClient sftpClient = connectionHolder . getSftpClient ( ) ; try { Path tmpPath = Paths . get ( rootDir ) ; for ( Path part : relativePath ) { tmpPath = tmpPath . resolve ( part ) ; try { sftpClient . mkdir ( tmpPath . toString ( ) ) ; } catch ( SftpException ignored ) { } } } catch ( IOException e ) { if ( e . getMessage ( ) . toLowerCase ( ) . contains ( "no such file" ) ) { String msg = Utils . getMsg ( "FILES_CLIENT_SSH_NOT_FOUND" , oboTenant , oboUser , systemId , username , host , remotePath ) ; throw new NotFoundException ( msg ) ; } else { String msg = Utils . getMsg ( "FILES_CLIENT_SSH_OP_ERR1" , oboTenant , oboUser , "mkdir" , systemId , username , host , remotePath , e . getMessage ( ) ) ; throw new IOException ( msg , e ) ; } } finally { sftpClient . close ( ) ; connectionHolder . returnSftpClient ( sftpClient ) ; } }
Creates a directory on a remotePath relative to rootDir
 @throws IOException
Creates a directory on a remotePath relative to rootDir @throws IOException