Secure iNet Factory

com.jscape.inet.sftp.requests
Class AttributesRequest

java.lang.Object
  extended by com.jscape.inet.sftp.requests.AttributesRequest
All Implemented Interfaces:
Request

public class AttributesRequest
extends java.lang.Object
implements Request

Version:
1.0
Author:
Alex
See Also:
Source code

Constructor Summary
AttributesRequest()
           
 
Method Summary
 void execute(SftpClient client)
          Executes request.
 boolean getFollowLink()
          Returns follow link flag.
 java.util.Date getModificationDate()
          Returns last modification date.
 java.lang.String getPath()
          Returns target path.
 java.lang.Integer getPermissions()
          Returns permissions in UNIX chmod format.
 java.lang.Long getSize()
          Returns file size if present.
 java.lang.Boolean isDirectory()
           
 boolean isValid()
          Checks if request is in valid state.
 void setFollowLink(boolean followLink)
          Sets follow link flag.
 void setPath(java.lang.String path)
          Sets target path.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributesRequest

public AttributesRequest()
Method Detail

getPath

public java.lang.String getPath()
Returns target path.

Returns:
target path

setPath

public void setPath(java.lang.String path)
Sets target path.

Parameters:
path - target path

getFollowLink

public boolean getFollowLink()
Returns follow link flag.

Returns:
true if request will try to follow link if any; false otherwise

setFollowLink

public void setFollowLink(boolean followLink)
Sets follow link flag. Enabling this flag forces request to follow symbolic link if any using SSH_FXP_LSTAT packet instead of usual SSH_FXP_STAT. This may lead to error on some servers.

Parameters:
followLink - follow link flag

getSize

public java.lang.Long getSize()
Returns file size if present.

Returns:
file size in bytes

getPermissions

public java.lang.Integer getPermissions()
Returns permissions in UNIX chmod format.

Returns:
permissions in UNIX chmod format

getModificationDate

public java.util.Date getModificationDate()
Returns last modification date.

Returns:
last modification date

isDirectory

public java.lang.Boolean isDirectory()

isValid

public boolean isValid()
Description copied from interface: Request
Checks if request is in valid state.

Specified by:
isValid in interface Request
Returns:
true if request is valid; false otherwise
See Also:
Request.isValid()

execute

public void execute(SftpClient client)
             throws SftpException
Description copied from interface: Request
Executes request.

Specified by:
execute in interface Request
Parameters:
client - client
Throws:
SftpException - if an error occurs
See Also:
Request.execute(com.jscape.inet.sftp.SftpClient)

Secure iNet Factory

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved