|
edtFTPj | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.enterprisedt.net.ftp.FTPFile
public class FTPFile
Represents a remote file (implementation)
Field Summary | |
---|---|
protected Date |
created
Created time |
protected static String |
cvsId
Revision control id |
protected String |
group
Group if known |
protected boolean |
isDir
Is this a directory? |
protected boolean |
isLink
Is this file a symbolic link? |
protected Date |
lastModified
Last modified |
protected int |
linkCount
Number of links to file |
protected String |
linkedname
Name of file this is linked to |
protected String |
name
File/dir name |
protected String |
owner
Owner if known |
protected String |
path
Directory if known |
protected String |
permissions
Permission bits string |
protected String |
raw
Raw string |
protected long |
size
Size of file |
static int |
UNIX
UNIX type |
static int |
UNKNOWN
Unknown remote server type |
static int |
VMS
VMS type |
static int |
WINDOWS
Windows type |
Constructor Summary | |
---|---|
FTPFile(int type,
String raw,
String name,
long size,
boolean isDir,
Date lastModified)
Deprecated. 'type' no longer used. |
|
FTPFile(String raw)
Constructor |
|
FTPFile(String raw,
String name,
long size,
boolean isDir,
Date lastModified)
Constructor |
Method Summary | |
---|---|
Date |
created()
Get the created date for the file. |
String |
getGroup()
|
int |
getLinkCount()
|
String |
getLinkedname()
|
String |
getName()
|
String |
getOwner()
|
String |
getPath()
|
String |
getPermissions()
|
String |
getRaw()
|
int |
getType()
Deprecated. No longer necessary. |
boolean |
isDir()
|
boolean |
isLink()
|
Date |
lastModified()
|
FTPFile[] |
listFiles()
Returns an array of FTPFile objects denoting the files and directories in this directory |
void |
setCreated(Date date)
Set the created date |
void |
setDir(boolean isDir)
|
void |
setGroup(String group)
|
void |
setLastModified(Date date)
Set the last modified date |
void |
setLink(boolean isLink)
|
void |
setLinkCount(int linkCount)
|
void |
setLinkedName(String linkedname)
|
void |
setName(String name)
Set the name of the file |
void |
setOwner(String owner)
|
void |
setPath(String path)
|
void |
setPermissions(String permissions)
|
void |
setSize(long size)
|
long |
size()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String cvsId
public static final int UNKNOWN
public static final int WINDOWS
public static final int UNIX
public static final int VMS
protected boolean isLink
protected int linkCount
protected String permissions
protected boolean isDir
protected long size
protected String name
protected String linkedname
protected String owner
protected String group
protected Date lastModified
protected Date created
protected String raw
protected String path
Constructor Detail |
---|
public FTPFile(int type, String raw, String name, long size, boolean isDir, Date lastModified)
type
- type of fileraw
- raw string returned from servername
- name of filesize
- size of fileisDir
- true if a directorylastModified
- last modified timestamppublic FTPFile(String raw, String name, long size, boolean isDir, Date lastModified)
raw
- raw string returned from servername
- name of filesize
- size of fileisDir
- true if a directorylastModified
- last modified timestamppublic FTPFile(String raw)
raw
- raw string returned from serverMethod Detail |
---|
public FTPFile[] listFiles()
public int getType()
public String getGroup()
public boolean isDir()
public Date lastModified()
public void setLastModified(Date date)
date
- last modified datepublic Date created()
public void setCreated(Date date)
date
- public String getName()
public void setName(String name)
name
- name of filepublic String getOwner()
public String getRaw()
public long size()
public void setSize(long size)
public String getPermissions()
public boolean isLink()
public int getLinkCount()
public String getLinkedname()
public void setGroup(String group)
group
- The group to set.public void setDir(boolean isDir)
isDir
- The isDir to set.public void setLink(boolean isLink)
isLink
- The isLink to set.public void setLinkedName(String linkedname)
linkedname
- The linked name to set.public void setOwner(String owner)
owner
- The owner to set.public void setPermissions(String permissions)
permissions
- The permissions to set.public void setLinkCount(int linkCount)
linkCount
- new link countpublic String toString()
toString
in class Object
public String getPath()
public void setPath(String path)
|
edtFTPj | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |