com.bea.wli.sftp.spi
Class SFtpFile

java.lang.Object
  extended by com.bea.wli.sftp.spi.SFtpFile
All Implemented Interfaces:
Serializable

public class SFtpFile
extends Object
implements Serializable

This class represents the SFtp File and contains information about that file

See Also:
Serialized Form

Constructor Summary
SFtpFile()
          Default constructor
SFtpFile(String absolutePath)
          Constructor
 
Method Summary
 boolean canRead()
          Return whether file can be read or not
 boolean canWrite()
          Return whether file can be writable or not
 boolean equals(Object object)
          Checks whether two SFtpClients are equal or not
 String getAbsolutePath()
          Returns the absolute path of the file
 String getFilename()
          Returns the file name
 long getModifiedTime()
          Returns the Modified time of the file
 String getParent()
          Returns the directory to which this file belongs to
 String getStageFilepath()
          Returns the path to the file where it is staged
 boolean isDirectory()
          Checks whether this is a directory or not
 boolean isFile()
          Checks whether this is a file or not
 boolean isLink()
          Returns whether this file represents a Unix link
 boolean isOpen()
          Returns whether this file is opened or not
 boolean isSocket()
          Returns whether this file represents a Socket
 void setAbsolutePath(String absolutePath)
          Sets the absolute path for the file
 void setDirectory(boolean isDirectory)
          Sets whether the file is a directory or not
 void setFile(boolean isFile)
          Sets whether this is file or not
 void setFileName(String filename)
          Sets the file name
 void setLink(boolean isLink)
          Sets whether this file represents a link or not
 void setModifiedTime(long time)
          Sets the modified time of the file
 void setOpen(boolean isOpen)
          Sets whether this file is opened or not
 void setParent(String parent)
          Set the directory to which this file belongs
 void setRead(boolean canRead)
          Sets whether the file can be read
 void setSize(long size)
          Sets the size of the file
 void setSocket(boolean isSocket)
          Sets whether this file represents a socket or not
 void setStageFilepath(String filepath)
          Sets the path where the file is staged
 void setWrite(boolean canWrite)
          Sets whether the file can be written
 long size()
          Returns the size of the file
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SFtpFile

public SFtpFile()
Default constructor


SFtpFile

public SFtpFile(String absolutePath)
Constructor

Parameters:
absolutePath - - Absolute path of the file
Method Detail

setAbsolutePath

public void setAbsolutePath(String absolutePath)
Sets the absolute path for the file

Parameters:
absolutePath - - absolute path of the file

getAbsolutePath

public String getAbsolutePath()
Returns the absolute path of the file

Returns:
absolute path of the file

getFilename

public String getFilename()
Returns the file name

Returns:
file name

setFileName

public void setFileName(String filename)
Sets the file name

Parameters:
filename - - name of the file

setSize

public void setSize(long size)
Sets the size of the file

Parameters:
size - - size of the file

size

public long size()
Returns the size of the file

Returns:
size of the file

setModifiedTime

public void setModifiedTime(long time)
Sets the modified time of the file

Parameters:
time - - modified time

getModifiedTime

public long getModifiedTime()
Returns the Modified time of the file

Returns:
modified time

setFile

public void setFile(boolean isFile)
Sets whether this is file or not

Parameters:
isFile - - whether is file or not

isFile

public boolean isFile()
Checks whether this is a file or not

Returns:
whether file or not

isDirectory

public boolean isDirectory()
Checks whether this is a directory or not

Returns:
whether directory or not

setDirectory

public void setDirectory(boolean isDirectory)
Sets whether the file is a directory or not

Parameters:
isDirectory - - is directory?

canRead

public boolean canRead()
Return whether file can be read or not

Returns:
can read the file

setRead

public void setRead(boolean canRead)
Sets whether the file can be read

Parameters:
canRead - - can read the file

canWrite

public boolean canWrite()
Return whether file can be writable or not

Returns:
can write the file

setWrite

public void setWrite(boolean canWrite)
Sets whether the file can be written

Parameters:
canWrite - - can write the file

isLink

public boolean isLink()
Returns whether this file represents a Unix link

Returns:
whether link or not

setLink

public void setLink(boolean isLink)
Sets whether this file represents a link or not

Parameters:
isLink - - whether link or not

isSocket

public boolean isSocket()
Returns whether this file represents a Socket

Returns:
whether Scoket or not

setSocket

public void setSocket(boolean isSocket)
Sets whether this file represents a socket or not

Parameters:
isSocket - - whether socket or not

isOpen

public boolean isOpen()
Returns whether this file is opened or not

Returns:
whether file opened or not

setOpen

public void setOpen(boolean isOpen)
Sets whether this file is opened or not

Parameters:
isOpen - - whether file is opened or not

setStageFilepath

public void setStageFilepath(String filepath)
Sets the path where the file is staged

Parameters:
filepath - - file path whether file is staged

getStageFilepath

public String getStageFilepath()
Returns the path to the file where it is staged

Returns:
staging file path

getParent

public String getParent()
Returns the directory to which this file belongs to

Returns:
directory containing this file

setParent

public void setParent(String parent)
Set the directory to which this file belongs

Parameters:
parent - - directory where this file resides

equals

public boolean equals(Object object)
Checks whether two SFtpClients are equal or not

Overrides:
equals in class Object
Parameters:
object - - SFtp Client
Returns:
whether both are same or not