Package com.xebialabs.overthere

Examples of com.xebialabs.overthere.RuntimeIOException


        logger.debug("Creating directory {}", this);

        try {
            connection.getSharedSftpClient().mkdir(getSftpPath());
        } catch (IOException e) {
            throw new RuntimeIOException(format("Cannot create directory %s", this), e);
        }
    }
View Full Code Here


    public void mkdirs() {
        logger.debug("Creating directories {}", this);
        try {
            connection.getSharedSftpClient().mkdirs(getSftpPath());
        } catch (IOException e) {
            throw new RuntimeIOException(format("Cannot create directories %s", this), e);
        }
    }
View Full Code Here

            SshSftpFile sftpDest = (SshSftpFile) dest;
            if (sftpDest.getConnection() == getConnection()) {
                try {
                    connection.getSharedSftpClient().rename(getSftpPath(), sftpDest.getSftpPath());
                } catch (IOException e) {
                    throw new RuntimeIOException(format("Cannot move/rename file/directory %s to %s", this, dest), e);
                }
            } else {
                throw new RuntimeIOException(format(
                        "Cannot move/rename ssh:%s: file/directory %s to file/directory %s because it is in a different connection",
                        connection.sshConnectionType.toString().toLowerCase(), this, dest));
            }
        } else {
            throw new RuntimeIOException(format("Cannot move/rename ssh:%s: file/directory %s  to non-ssh:%s: file/directory %s",
                    connection.sshConnectionType.toString().toLowerCase(), this, connection.sshConnectionType.toString().toLowerCase(), dest));
        }
    }
View Full Code Here

            } else {
                permissionsMask &= ~0111;
            }
            connection.getSharedSftpClient().chmod(getPath(), permissionsMask);
        } catch (IOException e) {
            throw new RuntimeIOException(format("Cannot set execute permission on %s to %b", this, executable), e);
        }
    }
View Full Code Here

        logger.debug("Deleting file {}", this);

        try {
            connection.getSharedSftpClient().rm(getSftpPath());
        } catch (IOException e) {
            throw new RuntimeIOException(format("Cannot delete file %s", this), e);
        }
    }
View Full Code Here

        logger.debug("Deleting directory {}", this);

        try {
            connection.getSharedSftpClient().rmdir(getSftpPath());
        } catch (IOException e) {
            throw new RuntimeIOException(format("Cannot delete directory %s", this), e);
        }
    }
View Full Code Here

                        connection.disconnectSftp(sftp);
                    }
                }
            });
        } catch (IOException e) {
            throw new RuntimeIOException("Cannot read from file " + this, e);
        }
    }
View Full Code Here

                        connection.disconnectSftp(sftp);
                    }
                }
            });
        } catch (IOException e) {
            throw new RuntimeIOException(format("Cannot write to %s", this), e);
        }
    }
View Full Code Here

        logger.debug("Checking for existence of {}", smbFile.getUncPath());

        try {
            return smbFile.exists();
        } catch (SmbException exc) {
            throw new RuntimeIOException(format("Cannot determine existence of %s: %s", smbFile.getUncPath(), exc.toString()), exc);
        }
    }
View Full Code Here

        logger.debug("Checking whether {} can be read", smbFile.getUncPath());

        try {
            return smbFile.canRead();
        } catch (SmbException exc) {
            throw new RuntimeIOException(format("Cannot determine whether %s can be read: %s", smbFile.getUncPath(), exc.toString()), exc);
        }
    }
View Full Code Here

TOP

Related Classes of com.xebialabs.overthere.RuntimeIOException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.