public class FtpFile
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
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,
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,
boolean isYearSet)
Creates a new FtpFile instance.
|
FtpFile(java.lang.String filename,
java.lang.String line,
FtpFileParser ftpFileParser)
Creates a new FtpFile instance.
|
Modifier and Type | Method and Description |
---|---|
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 . |
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.
|
boolean |
isYearSet()
Is year set.
|
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 |
setFtpFileParser(FtpFileParser value) |
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 |
setTime(java.lang.String fileTime)
Sets time for this
FtpFile . |
java.lang.String |
toString()
Gets string representation of this
FtpFile . |
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, 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, boolean isYearSet)
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 filepublic 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
public boolean isYearSet()
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 java.lang.String toString()
FtpFile
.toString
in class java.lang.Object
public boolean isHidden()
public FtpFileParser getFtpFileParser()
public void setFtpFileParser(FtpFileParser value)
public void setLine(java.lang.String line)
FtpFile
line
- the original linepublic java.lang.String getLine()
FtpFile
Copyright © JSCAPE LLC. 1999-2023. All Rights Reserved