public class FTPFile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Date |
created
Created time
|
protected static java.lang.String |
cvsId
Revision control id
|
protected java.lang.String |
group
Group if known
|
protected boolean |
isDir
Is this a directory?
|
protected boolean |
isLink
Is this file a symbolic link?
|
protected java.util.Date |
lastModified
Last modified
|
protected int |
linkCount
Number of links to file
|
protected java.lang.String |
linkedname
Name of file this is linked to
|
protected java.lang.String |
name
File/dir name
|
protected java.lang.String |
owner
Owner if known
|
protected java.lang.String |
path
Directory if known
|
protected java.lang.String |
permissions
Permission bits string
|
protected java.lang.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 and Description |
---|
FTPFile(int type,
java.lang.String raw,
java.lang.String name,
long size,
boolean isDir,
java.util.Date lastModified)
Deprecated.
'type' no longer used.
|
FTPFile(java.lang.String raw)
Constructor
|
FTPFile(java.lang.String raw,
java.lang.String name,
long size,
boolean isDir,
java.util.Date lastModified)
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.util.Date |
created()
Get the created date for the file.
|
java.lang.String |
getGroup() |
int |
getLinkCount() |
java.lang.String |
getLinkedname()
Deprecated.
|
java.lang.String |
getLinkedName() |
java.lang.String |
getName() |
java.lang.String |
getOwner() |
java.lang.String |
getPath() |
java.lang.String |
getPermissions() |
java.lang.String |
getRaw() |
int |
getType()
Deprecated.
No longer necessary.
|
boolean |
isDir() |
boolean |
isFile()
Is this a file (and not a directory
or a link).
|
boolean |
isLink() |
java.util.Date |
lastModified() |
FTPFile[] |
listFiles()
Returns an array of FTPFile objects denoting the files and directories in this
directory
|
void |
setCreated(java.util.Date date)
Set the created date
|
void |
setDir(boolean isDir) |
void |
setGroup(java.lang.String group) |
void |
setLastModified(java.util.Date date)
Set the last modified date
|
void |
setLink(boolean isLink) |
void |
setLinkCount(int linkCount) |
void |
setLinkedName(java.lang.String linkedname) |
void |
setName(java.lang.String name)
Set the name of the file
|
void |
setOwner(java.lang.String owner) |
void |
setPath(java.lang.String path)
Set the path of the file.
|
void |
setPermissions(java.lang.String permissions) |
void |
setSize(long size) |
long |
size() |
java.lang.String |
toString() |
protected static final java.lang.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 java.lang.String permissions
protected boolean isDir
protected long size
protected java.lang.String name
protected java.lang.String linkedname
protected java.lang.String owner
protected java.lang.String group
protected java.util.Date lastModified
protected java.util.Date created
protected java.lang.String raw
protected java.lang.String path
public FTPFile(int type, java.lang.String raw, java.lang.String name, long size, boolean isDir, java.util.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(java.lang.String raw, java.lang.String name, long size, boolean isDir, java.util.Date lastModified)
raw
- raw string returned from servername
- name of filesize
- size of fileisDir
- true if a directorylastModified
- last modified timestamppublic FTPFile(java.lang.String raw)
raw
- raw string returned from serverpublic FTPFile[] listFiles()
public int getType()
public java.lang.String getGroup()
public boolean isDir()
public boolean isFile()
public java.util.Date lastModified()
public void setLastModified(java.util.Date date)
date
- last modified datepublic java.util.Date created()
public void setCreated(java.util.Date date)
date
- public java.lang.String getName()
public void setName(java.lang.String name)
name
- name of filepublic java.lang.String getOwner()
public java.lang.String getRaw()
public long size()
public void setSize(long size)
public java.lang.String getPermissions()
public boolean isLink()
public int getLinkCount()
public java.lang.String getLinkedname()
public java.lang.String getLinkedName()
public void setGroup(java.lang.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(java.lang.String linkedname)
linkedname
- The linked name to set.public void setOwner(java.lang.String owner)
owner
- The owner to set.public void setPermissions(java.lang.String permissions)
permissions
- The permissions to set.public void setLinkCount(int linkCount)
linkCount
- new link countpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getPath()
public void setPath(java.lang.String path)
path
- Full path of the file.Copyright © 2001-2014 Enterprise Distributed Technologies Ltd. All Rights Reserved.