当前位置: 首页>>代码示例>>Java>>正文


Java SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS属性代码示例

本文整理汇总了Java中com.jcraft.jsch.SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS属性的典型用法代码示例。如果您正苦于以下问题:Java SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS属性的具体用法?Java SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS怎么用?Java SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.jcraft.jsch.SftpATTRS的用法示例。


在下文中一共展示了SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getFileType

public FileType getFileType(String filename) throws KettleJobException
 {
try {
	SftpATTRS attrs=c.stat(filename);
		if (attrs == null)	return FileType.IMAGINARY;
		
		if ((attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS) == 0)
			throw new KettleJobException("Unknown permissions error");

		if (attrs.isDir())
			return FileType.FOLDER;
		else
			return FileType.FILE;
} catch (Exception e) {
		throw new KettleJobException(e);
	}
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:17,代码来源:SFTPClient.java

示例2: folderExists

public boolean folderExists(String foldername) 
 {
	boolean retval =false;
	try {
		SftpATTRS attrs=c.stat(foldername);
 		if (attrs == null) return false;
 		
 		if ((attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS) == 0)
 			throw new KettleJobException("Unknown permissions error");

 		retval=attrs.isDir();
	} catch (Exception e) {
		// Folder can not be found!
		}
	return retval;
}
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:16,代码来源:SFTPClient.java

示例3: folderExists

public boolean folderExists(String foldername) 
 {
	boolean retval =false;
	try {
		SftpATTRS attrs=c.stat(foldername);
 		if (attrs == null) return false;
 		
 		if ((attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS) == 0)
 			throw new KettleJobException("Unknown permissions error");

 		retval=attrs.isDir();
	} catch (Exception e) {
		// Folder can not be found!
	}
	return retval;
}
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:16,代码来源:SFTPClient.java

示例4: getFileType

public FileType getFileType( String filename ) throws KettleJobException {
  try {
    SftpATTRS attrs = c.stat( filename );
    if ( attrs == null ) {
      return FileType.IMAGINARY;
    }

    if ( ( attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS ) == 0 ) {
      throw new KettleJobException( "Unknown permissions error" );
    }

    if ( attrs.isDir() ) {
      return FileType.FOLDER;
    } else {
      return FileType.FILE;
    }
  } catch ( Exception e ) {
    throw new KettleJobException( e );
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:20,代码来源:SFTPClient.java

示例5: folderExists

public boolean folderExists( String foldername ) {
  boolean retval = false;
  try {
    SftpATTRS attrs = c.stat( foldername );
    if ( attrs == null ) {
      return false;
    }

    if ( ( attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS ) == 0 ) {
      throw new KettleJobException( "Unknown permissions error" );
    }

    retval = attrs.isDir();
  } catch ( Exception e ) {
    // Folder can not be found!
  }
  return retval;
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:18,代码来源:SFTPClient.java

示例6: doGetType

/**
 * Determines the type of this file, returns null if the file does not
 * exist.
 */
@Override
protected FileType doGetType() throws Exception
{
    if (attrs == null)
    {
        statSelf();
    }

    if (attrs == null)
    {
        return FileType.IMAGINARY;
    }

    if ((attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS) == 0)
    {
        throw new FileSystemException(
                "vfs.provider.sftp/unknown-permissions.error");
    }
    if (attrs.isDir())
    {
        return FileType.FOLDER;
    }
    else
    {
        return FileType.FILE;
    }
}
 
开发者ID:wso2,项目名称:wso2-commons-vfs,代码行数:31,代码来源:SftpFileObject.java

示例7: doGetType

/**
 * Determines the type of this file, returns null if the file does not
 * exist.
 */
protected FileType doGetType() throws Exception
{
    if (attrs == null)
    {
        statSelf();
    }

    if (attrs == null)
    {
        return FileType.IMAGINARY;
    }

    if ((attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS) == 0)
    {
        throw new FileSystemException(
                "vfs.provider.sftp/unknown-permissions.error");
    }
    if (attrs.isDir())
    {
        return FileType.FOLDER;
    }
    else
    {
        return FileType.FILE;
    }
}
 
开发者ID:pentaho,项目名称:pdi-vfs,代码行数:30,代码来源:SftpFileObject.java


注:本文中的com.jcraft.jsch.SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。