public void chmod(String path, int permissions) throws IOException { SFTPv3FileAttributes atts = new SFTPv3FileAttributes(); atts.permissions = permissions; setstat(path, atts); }
/** * Checks if file is a directory * * @param sftpClient * @param filename * @return true, if filename is a directory */ public boolean isDirectory( SFTPv3Client sftpClient, String filename ) { try { return sftpClient.stat( filename ).isDirectory(); } catch ( Exception e ) { // Ignore FTP errors } return false; }
workingDirectory)); sftpClient.mkdirs(workingDirectory, 0700); } else if (fileAttributes.isRegularFile()) { throw new IOException(Messages.SSHLauncher_RemoteFSIsAFile(workingDirectory));
workingDirectory)); sftpClient.mkdirs(workingDirectory, 0700); } else if (fileAttributes.isRegularFile()) { throw new IOException(Messages.SSHLauncher_RemoteFSIsAFile(workingDirectory));
/** * Change file or directory permissions. * @param path file or directory path. * @param permissions POSIX permissions. * @throws IOException in case of error. */ public void chmod(String path, int permissions) throws IOException { SFTPv3FileAttributes atts = new SFTPv3FileAttributes(); atts.permissions = permissions; setstat(path, atts); }
/** * Makes sure that the directory exists, by creating it if necessary. */ public void mkdirs(String path, int posixPermission) throws IOException { SFTPv3FileAttributes atts = _stat(path); if (atts!=null && atts.isDirectory()) return; int idx = path.lastIndexOf("/"); if (idx>0) mkdirs(path.substring(0,idx), posixPermission); try { mkdir(path, posixPermission); } catch (IOException e) { throw new IOException("Failed to mkdir "+path,e); } }
public void chmod(String path, int permissions) throws IOException { SFTPv3FileAttributes atts = new SFTPv3FileAttributes(); atts.permissions = permissions; setstat(path, atts); }
/** * Checks if a directory exists * * @param sftpClient * @param directory * @return true, if directory exists */ public boolean sshDirectoryExists( SFTPv3Client sftpClient, String directory ) { try { SFTPv3FileAttributes attributes = sftpClient.stat( directory ); if ( attributes != null ) { return ( attributes.isDirectory() ); } else { return false; } } catch ( Exception e ) { return false; } }
public void chmod(String path, int permissions) throws IOException { SFTPv3FileAttributes atts = new SFTPv3FileAttributes(); atts.permissions = permissions; setstat(path, atts); }
/** * Makes sure that the directory exists, by creating it if necessary. */ public void mkdirs(String path, int posixPermission) throws IOException { SFTPv3FileAttributes atts = _stat(path); if (atts!=null && atts.isDirectory()) return; int idx = path.lastIndexOf("/"); if (idx>0) mkdirs(path.substring(0,idx), posixPermission); try { mkdir(path, posixPermission); } catch (IOException e) { throw new IOException("Failed to mkdir "+path,e); } }
/** * Change file or directory permissions. * @param path file or directory path. * @param permissions POSIX permissions. * @throws IOException in case of error. */ public void chmod(String path, int permissions) throws IOException { SFTPv3FileAttributes atts = new SFTPv3FileAttributes(); atts.permissions = permissions; setstat(path, atts); }
/** * Makes sure that the directory exists, by creating it if necessary. */ public void mkdirs(String path, int posixPermission) throws IOException { SFTPv3FileAttributes atts = _stat(path); if (atts!=null && atts.isDirectory()) return; int idx = path.lastIndexOf('/'); if (idx>0) mkdirs(path.substring(0,idx), posixPermission); try { mkdir(path, posixPermission); } catch (IOException e) { throw new IOException("Failed to mkdir "+path,e); } }
public void chmod(String path, int permissions) throws IOException { SFTPv3FileAttributes atts = new SFTPv3FileAttributes(); atts.permissions = permissions; setstat(path, atts); }
/** * Makes sure that the directory exists, by creating it if necessary. * * @param path the path * @param posixPermission the posix permission * @throws IOException the io exception */ public void mkdirs(String path, int posixPermission) throws IOException { SFTPv3FileAttributes atts = _stat(path); if (atts!=null && atts.isDirectory()) return; int idx = path.lastIndexOf("/"); if (idx>0) mkdirs(path.substring(0,idx), posixPermission); try { mkdir(path, posixPermission); } catch (IOException e) { throw (IOException)new IOException("Failed to mkdir "+path).initCause(e); } }
public void chmod(String path, int permissions) throws IOException { SFTPv3FileAttributes atts = new SFTPv3FileAttributes(); atts.permissions = permissions; setstat(path, atts); }
/** * Makes sure that the directory exists, by creating it if necessary. * @param path directory path. * @param posixPermission POSIX permissions. * @throws IOException if it is not possible to access to the directory. */ public void mkdirs(String path, int posixPermission) throws IOException { SFTPv3FileAttributes atts = _stat(path); if (atts!=null && atts.isDirectory()) return; int idx = path.lastIndexOf('/'); if (idx>0) mkdirs(path.substring(0,idx), posixPermission); try { mkdir(path, posixPermission); } catch (IOException e) { throw new IOException("Failed to mkdir "+path,e); } }
/** * Chmod. * * @param path the path * @param permissions the permissions * @throws IOException the io exception */ public void chmod(String path, int permissions) throws IOException { SFTPv3FileAttributes atts = new SFTPv3FileAttributes(); atts.permissions = Integer.valueOf(permissions); setstat(path, atts); } }
/** * Makes sure that the directory exists, by creating it if necessary. * @param path directory path. * @param posixPermission POSIX permissions. * @throws IOException if it is not possible to access to the directory. */ public void mkdirs(String path, int posixPermission) throws IOException { SFTPv3FileAttributes atts = _stat(path); if (atts!=null && atts.isDirectory()) return; int idx = path.lastIndexOf('/'); if (idx>0) mkdirs(path.substring(0,idx), posixPermission); try { mkdir(path, posixPermission); } catch (IOException e) { throw new IOException("Failed to mkdir "+path,e); } }
SFTPv3FileAttributes fa = new SFTPv3FileAttributes();
/** * Makes sure that the directory exists, by creating it if necessary. */ public void mkdirs(String path, int posixPermission) throws IOException { SFTPv3FileAttributes atts = _stat(path); if (atts!=null && atts.isDirectory()) return; int idx = path.lastIndexOf("/"); if (idx>0) mkdirs(path.substring(0,idx), posixPermission); try { mkdir(path, posixPermission); } catch (IOException e) { throw new IOException2("Failed to mkdir "+path,e); } }