Package com.trilead.ssh2.auth

Examples of com.trilead.ssh2.auth.AuthenticationManager


     * @throws Exception
     */
    public boolean sshFileExists(SFTPv3Client sftpClient, String filename) {
       
        try {
            SFTPv3FileAttributes attributes = sftpClient.stat(filename);
           
            if (attributes != null) {
                return (attributes.isRegularFile() || attributes.isDirectory());
            } else {
                return false;
            }
           
        } catch (Exception e) {
View Full Code Here


     * @throws Exception
     */
    public int sshFilePermissions(SFTPv3Client sftpClient, String filename) {
       
        try {
            SFTPv3FileAttributes attributes = sftpClient.stat(filename);
           
            if (attributes != null) {
                return attributes.permissions.intValue();
            } else {
                return 0;
View Full Code Here

     * @throws Exception
     */
    private boolean fileExists( String filename) {
       
        try {
            SFTPv3FileAttributes attributes = sftpClient.stat(filename);
           
            if (attributes != null) {
                return (attributes.isRegularFile() || attributes.isDirectory());
            } else {
                return false;
            }
           
        } catch (Exception e) {
View Full Code Here

  }

  private boolean fileExists(String filename) {

    try {
      SFTPv3FileAttributes attributes = Client().stat(filename);

      if (attributes != null) {
        return (attributes.isRegularFile() || attributes.isDirectory());
      }
      else {
        return false;
      }
View Full Code Here

   * @throws Exception
   */
  protected boolean sshFileExists(SFTPv3Client sftpClient, String filename) {

    try {
      SFTPv3FileAttributes attributes = sftpClient.stat(filename);

      if (attributes != null) {
        return (attributes.isRegularFile() || attributes.isDirectory());
      }
      else {
        return false;
      }

View Full Code Here

   * @throws Exception
   */
  protected int sshFilePermissions(SFTPv3Client sftpClient, String filename) {

    try {
      SFTPv3FileAttributes attributes = sftpClient.stat(filename);

      if (attributes != null) {
        return attributes.permissions.intValue();
      }
      else {
View Full Code Here

    /**
     * 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);
View Full Code Here

            }
        };
    }

    public void chmod(String path, int permissions) throws IOException {
        SFTPv3FileAttributes atts = new SFTPv3FileAttributes();
        atts.permissions = permissions;
        setstat(path, atts);
    }
View Full Code Here

          pfleCommandFile = fleResultFile;
        }
      }

      // set execute permissions for owner
      SFTPv3FileHandle fileHandle = this.getFileHandle(strFileName, new Integer(0700));

      FileInputStream fis = null;
      long offset = 0;
      try {
        fis = new FileInputStream(pfleCommandFile);
View Full Code Here

    @SuppressWarnings("unused")
    final String conMethodName = conClassName + "::setFilePermissions";

    SFTPv3FileAttributes attr = new SFTPv3FileAttributes();
    attr.permissions = pintPermissions;
    SFTPv3FileHandle fileHandle = this.FtpClient().createFileTruncate(pstrFileName, attr);
    return fileHandle;
  } // private void setFilePermissions
View Full Code Here

TOP

Related Classes of com.trilead.ssh2.auth.AuthenticationManager

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.