|
Secure iNet Factory | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jscape.inet.ftp.FtpFile
Represents an item in a directory listing retrieved from FTP server.
| Field Summary | |
static int |
MSDOS_STYLE
Deprecated. no longer used in favor of FtpFile#getFtpFileParser method. |
static int |
UNIX_STYLE
Deprecated. no longer used in favor of FtpFile#getFtpFileParser method. |
| Constructor Summary | |
FtpFile(java.lang.String filename)
Creates a new FtpFile instance. |
|
FtpFile(java.lang.String filename,
FtpFileParser ftpFileParser)
Creates a new FtpFile instance. |
|
FtpFile(java.lang.String filename,
long filesize,
java.lang.String owner,
java.lang.String group,
java.lang.String permission,
java.lang.String fileDate,
java.lang.String fileTime,
boolean directory,
boolean link,
java.lang.String linkTarget,
int style,
java.lang.String line)
Creates a new FtpFile instance. |
|
FtpFile(java.lang.String filename,
java.lang.String line,
FtpFileParser ftpFileParser)
Creates a new FtpFile instance. |
|
| Method Summary | |
java.lang.String |
getDate()
Gets date for this FtpFile. |
java.lang.String |
getFilename()
Gets filename for this FtpFile. |
long |
getFilesize()
Gets file size for this FtpFile. |
FtpFileParser |
getFtpFileParser()
Gets the FtpFileParser that created this FtpFile |
java.lang.String |
getGroup()
Gets group for this FtpFile. |
java.lang.String |
getLine()
Gets the original line sent by FTP server and used in parsing this FtpFile |
java.lang.String |
getLinkTarget()
If the directory listing entry for this file is a link and link target is specified by the server, this method can be used to retrieve the link target. |
java.lang.String |
getOwner()
Gets owner of this FtpFile. |
java.lang.String |
getPermission()
Gets permissions string for this FtpFile. |
int |
getStyle()
Deprecated. no longer used in favor of FtpFile#getFtpFileParser method. |
java.lang.String |
getTime()
Gets time for this FtpFile. |
boolean |
isDirectory()
Test if this file represents a directory on the server. |
boolean |
isHidden()
Checks where the filename is a hidden filename by checking to see if filename begins with a period. |
boolean |
isLink()
Test wheather the entity represented by this FtpFile object is a symbolic link. |
void |
setDate(java.lang.String fileDate)
Sets date for this FtpFile. |
void |
setDirectory(boolean isDirectory)
Denotes file as a directory. |
void |
setFilename(java.lang.String filename)
Sets filename for this FtpFile. |
void |
setFilesize(java.lang.String size)
Sets file size for this FtpFile. |
void |
setGroup(java.lang.String group)
Sets group for this FtpFile. |
void |
setLine(java.lang.String line)
Sets the original line sent by FTP server and used in parsing this FtpFile |
void |
setLinkTarget(java.lang.String s)
Set the target if this entry is a link. |
void |
setOwner(java.lang.String owner)
Sets owner of this FtpFile. |
void |
setPermission(java.lang.String permission)
Sets permissions string for this FtpFile. |
void |
setStyle(int style)
Deprecated. no longer used in favor of providing a FtpFileParser in constructor |
void |
setTime(java.lang.String fileTime)
Sets time for this FtpFile. |
java.lang.String |
toString()
Gets string representation of this FtpFile. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int UNIX_STYLE
getStyle(),
getFtpFileParser(),
Constant Field Valuespublic static final int MSDOS_STYLE
getStyle(),
getFtpFileParser(),
Constant Field Values| Constructor Detail |
public FtpFile(java.lang.String filename,
long filesize,
java.lang.String owner,
java.lang.String group,
java.lang.String permission,
java.lang.String fileDate,
java.lang.String fileTime,
boolean directory,
boolean link,
java.lang.String linkTarget,
int style,
java.lang.String line)
filename - the name of the filefilesize - the size of the fileowner - the owner or owner id of the filegroup - the group or group id of the filepermission - the permissions for the filefileDate - the last modified date of the filefileTime - the last modified time of the filedirectory - true if is a directorylink - true if is a symbolic linklinkTarget - the target if a symbolic linkstyle - the directory listing style usedline - the original line used to generate this entrypublic FtpFile(java.lang.String filename)
filename - the name of file
public FtpFile(java.lang.String filename,
java.lang.String line,
FtpFileParser ftpFileParser)
filename - the name of fileline - the original line sent by FTP server and used in parsing this FtpFile
public FtpFile(java.lang.String filename,
FtpFileParser ftpFileParser)
filename - the name of fileftpFileParser - the FtpFileParser that created this FtpFileFtpFileParser| Method Detail |
public void setFilename(java.lang.String filename)
FtpFile.
filename - the name of filepublic java.lang.String getFilename()
FtpFile.
public void setFilesize(java.lang.String size)
FtpFile.
size - the size of file in bytespublic long getFilesize()
FtpFile.
public void setOwner(java.lang.String owner)
FtpFile.
owner - the name of ownerpublic java.lang.String getOwner()
FtpFile.
public void setGroup(java.lang.String group)
FtpFile.
group - the name of grouppublic java.lang.String getGroup()
FtpFile.
public void setPermission(java.lang.String permission)
FtpFile.
permission - a permissions stringpublic java.lang.String getPermission()
FtpFile.
The permissions string usually has the standard unix form,
such as: drwxr-xr-x -rw-rw-r-- lrw-r--r--
isDirectory(),
isLink(),
getLinkTarget()public boolean isDirectory()
true if is a directory false otherwiseisLink()public void setDirectory(boolean isDirectory)
isDirectory - true if file is a directory false otherwisepublic boolean isLink()
true if is a symbolic link false otherwisegetLinkTarget()public void setLinkTarget(java.lang.String s)
s - the link target path namepublic java.lang.String getLinkTarget()
isLink()public void setDate(java.lang.String fileDate)
FtpFile.
fileDate - the date of the filepublic java.lang.String getDate()
FtpFile.
public void setTime(java.lang.String fileTime)
FtpFile.
fileTime - of the filepublic java.lang.String getTime()
FtpFile.
public void setStyle(int style)
FtpFile.UNIX_STYLE
style - the style of directory listing either FtpFile.UNIX_STYLE or FtpFile.MSDOS_STYLEMSDOS_STYLE,
UNIX_STYLE,
FtpFileParserpublic int getStyle()
FtpFile.UNIX_STYLE
MSDOS_STYLE,
UNIX_STYLE,
FtpFileParserpublic java.lang.String toString()
FtpFile.
public boolean isHidden()
public FtpFileParser getFtpFileParser()
public void setLine(java.lang.String line)
FtpFile
line - the original linepublic java.lang.String getLine()
FtpFile
|
Secure iNet Factory | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||