FtpDirEntry is a class agregating all the information that the FTP client
can gather from the server by doing a LST (or NLST) command and
parsing the output. It will typically contain the name, type, size, last modification
time, owner and group of the file, although some of these could be unavailable
due to specific FTP server limitations.
sun.net.ftp.FtpDirParser
| Modifier and Type | Class and Description |
|---|---|
| public static enum | |
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| private Date | |
| private HashMap | |
| private String | |
| private Date | |
| private final String | |
| private boolean[][] | |
| private long | |
| private FtpDirEntry. | |
| private String |
| Access | Constructor and Description |
|---|---|
| private | |
| public | FtpDirEntry(String
The name of the file name)Creates an FtpDirEntry instance with only the name being set. |
| Modifier and Type | Method and Description |
|---|---|
| public FtpDirEntry | |
| public boolean | Returns: true if execute access is granted.the Permission (user, group, others) to check. pReturns whether execute access is granted for a specific permission. |
| public boolean | Returns: true if read access is granted.the Permission (user, group, others) to check. pReturns whether read access is granted for a specific permission. |
| public boolean | Returns: true if write access is granted.the Permission (user, group, others) to check. pReturns whether write access is granted for a specific permission. |
| public Date | Returns: The Date representing the creation time, ornull
if the server didn't provide that information.Returns the creation time of the file, when provided by the server. |
| public String | |
| public String | Returns: aString containing the group name or
null if that information is not available.Returns the group name of the file as returned by the FTP server, if provided. |
| public Date | Returns: aDate representing the last time the file was
modified on the server, or null if that
information is not available.Returns the last modification time of the remote file as it was returned
by the FTP server, if provided, |
| public String | Returns: aString containing the name of the remote file.Returns the name of the remote file. |
| public long | Returns: the size of the file or -1 if that information is not available.Returns the size of the remote file as it was returned by the FTP server, if provided. |
| public FtpDirEntry. | Returns: aFtpDirEntry.Type describing the type of the file
or null if that information is not available.Returns the type of the remote file as it was returned by the FTP server, if provided. |
| public String | Returns: aString containing the user name or
null if that information is not available.Returns the user name of the owner of the file as returned by the FTP server, if provided. |
| public FtpDirEntry | Returns: this FtpDirEntrythe Date representing the creation time for that file, or
created)null if that information is not available.Sets the creation time for that file. |
| public FtpDirEntry | |
| public FtpDirEntry | Returns: this FtpDirEntryThe Date representing the last modification time, or
lastModified)null if that information is not available.Sets the last modification time of the file. |
| public FtpDirEntry | Returns: thisFtpDirEntrya 3x3 permissions)boolean arraySets the permissions for that file. |
| public FtpDirEntry | Returns: this FtpDirEntryThe size, in bytes, of that file. or -1 if unknown. size)Sets the size of that file. |
| public FtpDirEntry | Returns: this FtpDirEntrythe type of this file or typenull if that information
is not available.Sets the type of the file. |
| public FtpDirEntry | |
| public String | Returns: a string representation of the object.Overrides java. Returns a string representation of the object. |
| created | back to summary |
|---|---|
| private Date created | |
| facts | back to summary |
|---|---|
| private HashMap<String, String> facts | |
| group | back to summary |
|---|---|
| private String group | |
| lastModified | back to summary |
|---|---|
| private Date lastModified | |
| name | back to summary |
|---|---|
| private final String name | |
| permissions | back to summary |
|---|---|
| private boolean[][] permissions | |
| size | back to summary |
|---|---|
| private long size | |
| type | back to summary |
|---|---|
| private FtpDirEntry. | |
| user | back to summary |
|---|---|
| private String user | |
| FtpDirEntry | back to summary |
|---|---|
| private FtpDirEntry() | |
| FtpDirEntry | back to summary |
|---|---|
| public FtpDirEntry(String name) Creates an FtpDirEntry instance with only the name being set.
| |
| addFact | back to summary |
|---|---|
| public FtpDirEntry addFact(String fact, String value) Adds a 'fact', as defined in RFC 3659, to the list of facts of this file.
Intended mostly to be used from inside a
| |
| canExexcute | back to summary |
|---|---|
| public boolean canExexcute(FtpDirEntry. Returns whether execute access is granted for a specific permission.
| |
| canRead | back to summary |
|---|---|
| public boolean canRead(FtpDirEntry. Returns whether read access is granted for a specific permission.
| |
| canWrite | back to summary |
|---|---|
| public boolean canWrite(FtpDirEntry. Returns whether write access is granted for a specific permission.
| |
| getCreated | back to summary |
|---|---|
| public Date getCreated() Returns the creation time of the file, when provided by the server.
| |
| getFact | back to summary |
|---|---|
| public String getFact(String fact) Returns the requested 'fact', as defined in RFC 3659, if available. | |
| getGroup | back to summary |
|---|---|
| public String getGroup() Returns the group name of the file as returned by the FTP server, if provided. This could be a name or a group id (number).
| |
| getLastModified | back to summary |
|---|---|
| public Date getLastModified() Returns the last modification time of the remote file as it was returned
by the FTP server, if provided,
| |
| getName | back to summary |
|---|---|
| public String getName() Returns the name of the remote file.
| |
| getSize | back to summary |
|---|---|
| public long getSize() Returns the size of the remote file as it was returned by the FTP server, if provided.
| |
| getType | back to summary |
|---|---|
| public FtpDirEntry. Returns the type of the remote file as it was returned by the FTP server, if provided. It returns a FtpDirEntry.Type enum and the values can be: - FtpDirEntry.Type.FILE for a normal file - FtpDirEntry.Type.DIR for a directory - FtpDirEntry.Type.LINK for a symbolic link
| |
| getUser | back to summary |
|---|---|
| public String getUser() Returns the user name of the owner of the file as returned by the FTP server, if provided. This could be a name or a user id (number).
| |
| setCreated | back to summary |
|---|---|
| public FtpDirEntry setCreated(Date created) Sets the creation time for that file. Intended mostly to be used from
inside a
| |
| setGroup | back to summary |
|---|---|
| public FtpDirEntry setGroup(String group) Sets the name of the group to which the file belong. Intended mostly to be
used from inside a
| |
| setLastModified | back to summary |
|---|---|
| public FtpDirEntry setLastModified(Date lastModified) Sets the last modification time of the file. Intended mostly to be used
from inside an
| |
| setPermissions | back to summary |
|---|---|
| public FtpDirEntry setPermissions(boolean[][] permissions) Sets the permissions for that file. Intended mostly to be used
from inside an E.G.:
| |
| setSize | back to summary |
|---|---|
| public FtpDirEntry setSize(long size) Sets the size of that file. Intended mostly to be used from inside an
| |
| setType | back to summary |
|---|---|
| public FtpDirEntry setType(FtpDirEntry. Sets the type of the file. Intended mostly to be used from inside an
| |
| setUser | back to summary |
|---|---|
| public FtpDirEntry setUser(String user) Sets the user name of the owner of the file. Intended mostly to be
used from inside a
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of the object.
The | |
| Modifier and Type | Field and Description |
|---|---|
| public static final FtpDirEntry. | |
| public static final FtpDirEntry. | |
| public static final FtpDirEntry. | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static FtpDirEntry. | |
| public static FtpDirEntry. |
| GROUP | back to summary |
|---|---|
| public static final FtpDirEntry. | |
| OTHERS | back to summary |
|---|---|
| public static final FtpDirEntry. | |
| USER | back to summary |
|---|---|
| public static final FtpDirEntry. | |
| value | back to summary |
|---|---|
| pack-priv int value | |
| Permission | back to summary |
|---|---|
| private Permission(int v) | |
| valueOf | back to summary |
|---|---|
| public static FtpDirEntry. | |
| values | back to summary |
|---|---|
| public static FtpDirEntry. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final FtpDirEntry. | |
| public static final FtpDirEntry. | |
| public static final FtpDirEntry. | |
| public static final FtpDirEntry. | |
| public static final FtpDirEntry. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static FtpDirEntry. | |
| public static FtpDirEntry. |
| CDIR | back to summary |
|---|---|
| public static final FtpDirEntry. | |
| DIR | back to summary |
|---|---|
| public static final FtpDirEntry. | |
| FILE | back to summary |
|---|---|
| public static final FtpDirEntry. | |
| LINK | back to summary |
|---|---|
| public static final FtpDirEntry. | |
| PDIR | back to summary |
|---|---|
| public static final FtpDirEntry. | |
| Type | back to summary |
|---|---|
| private Type() | |
| valueOf | back to summary |
|---|---|
| public static FtpDirEntry. | |
| values | back to summary |
|---|---|
| public static FtpDirEntry. | |