RSE
Release 1.0

org.eclipse.rse.services.ssh.files
Class SftpHostFile

java.lang.Object
  extended byorg.eclipse.rse.services.ssh.files.SftpHostFile
All Implemented Interfaces:
IHostFile

public class SftpHostFile
extends Object
implements IHostFile


Constructor Summary
SftpHostFile(String parentPath, String name, boolean isDirectory, boolean isRoot, boolean isLink, long lastModified, long size)
           
 
Method Summary
 boolean canExecute()
           
 boolean canRead()
           
 boolean canWrite()
           
 boolean exists()
           
 String getAbsolutePath()
           
 String getClassification()
           
 String[] getExtendedData()
          Return extended data as name,value pairs.
 String getLinkTarget()
           
 long getModifiedDate()
           
 String getName()
           
 String getParentPath()
           
 long getSize()
           
protected  boolean internalIsArchive()
           
 boolean isArchive()
           
 boolean isDirectory()
           
 boolean isFile()
           
 boolean isHidden()
           
 boolean isLink()
           
 boolean isRoot()
           
 void renameTo(String newAbsolutePath)
           
 void setExecutable(boolean b)
           
 void setExists(boolean b)
           
 void setExtendedData(String[] extended)
          Set Extended data as key,value pairs.
 void setLinkTarget(String linkTarget)
           
 void setReadable(boolean b)
           
 void setWritable(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SftpHostFile

public SftpHostFile(String parentPath,
                    String name,
                    boolean isDirectory,
                    boolean isRoot,
                    boolean isLink,
                    long lastModified,
                    long size)
Method Detail

getName

public String getName()
Specified by:
getName in interface IHostFile

isHidden

public boolean isHidden()
Specified by:
isHidden in interface IHostFile

getParentPath

public String getParentPath()
Specified by:
getParentPath in interface IHostFile

isDirectory

public boolean isDirectory()
Specified by:
isDirectory in interface IHostFile

isFile

public boolean isFile()
Specified by:
isFile in interface IHostFile

isRoot

public boolean isRoot()
Specified by:
isRoot in interface IHostFile

setExists

public void setExists(boolean b)

exists

public boolean exists()
Specified by:
exists in interface IHostFile

getAbsolutePath

public String getAbsolutePath()
Specified by:
getAbsolutePath in interface IHostFile

getSize

public long getSize()
Specified by:
getSize in interface IHostFile

getModifiedDate

public long getModifiedDate()
Specified by:
getModifiedDate in interface IHostFile

renameTo

public void renameTo(String newAbsolutePath)
Specified by:
renameTo in interface IHostFile

internalIsArchive

protected boolean internalIsArchive()

isArchive

public boolean isArchive()
Specified by:
isArchive in interface IHostFile

isLink

public boolean isLink()

setLinkTarget

public void setLinkTarget(String linkTarget)

getLinkTarget

public String getLinkTarget()

setExtendedData

public void setExtendedData(String[] extended)
Set Extended data as key,value pairs. The data is maintained as a String array, where every element with an even index refers to a key, and the next element refers to its value. Example extended[0] = "acl" extended[1] = "joe,tim" extended[2] = "version" extended[3] = "/main/3"

Parameters:
extended - String[] array of key,value pairs

getExtendedData

public String[] getExtendedData()
Return extended data as name,value pairs.

Returns:
String[] array of key,value pairs
See Also:
setExtendedData(String[])

getClassification

public String getClassification()

setReadable

public void setReadable(boolean b)

setWritable

public void setWritable(boolean b)

setExecutable

public void setExecutable(boolean b)

canRead

public boolean canRead()
Specified by:
canRead in interface IHostFile

canWrite

public boolean canWrite()
Specified by:
canWrite in interface IHostFile

canExecute

public boolean canExecute()

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.