|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hermesftp.cmd.AbstractFtpCmd net.sf.hermesftp.cmd.AbstractFtpCmdList net.sf.hermesftp.cmd.impl.FtpCmdList
public class FtpCmdList
LIST (LIST)
This command causes a list to be sent from the server to the passive DTP. If the pathname specifies a directory or other group of files, the server should transfer a list of files in the specified directory. If the pathname specifies a file then the server should send current information on the file. A null argument implies the user's current working or default directory. The data transfer is over the data connection in type ASCII or type EBCDIC. (The user must ensure that the TYPE is appropriately ASCII or EBCDIC). Since the information on a file may vary widely from system to system, this information may be hard to use automatically in a program, but may be quite useful to a human user.
[Excerpt from RFC-959, Postel and Reynolds]
Field Summary |
---|
Constructor Summary | |
---|---|
FtpCmdList()
|
Method Summary | |
---|---|
protected void |
doPrintFileInfo(java.io.PrintWriter out,
java.io.File file,
FtpSessionContext ctx)
Lists the contents of the current working directory if no arugment was passed. |
java.lang.String |
getHelp()
Returns a short help text for the command. |
boolean |
isAuthenticationRequired()
Returns whether authentication is needed or not. |
Methods inherited from class net.sf.hermesftp.cmd.AbstractFtpCmdList |
---|
execute |
Methods inherited from class net.sf.hermesftp.cmd.AbstractFtpCmd |
---|
getAbsPath, getAndResetFileOffset, getArguments, getCtx, getPathArg, getPermission, getToken, handleAsyncCmd, isResponded, msg, msg, msg, msgOut, msgOut, msgOut, out, setArguments, setCtx, setToken |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FtpCmdList()
Method Detail |
---|
public java.lang.String getHelp()
protected void doPrintFileInfo(java.io.PrintWriter out, java.io.File file, FtpSessionContext ctx) throws java.io.IOException
Example directory in unix mode:
drw-rw-rw- 1 user group 0 Jan 21 19:53 . drw-rw-rw- 1 user group 0 Jan 21 19:53 .. -rw-rw-rw- 1 user group 76806 Dec 20 15:17 FILELOAD.pdf drw-rw-rw- 1 user group 0 Jan 21 16:29 rr -rw-rw-rw- 1 user group 5037072 Jan 19 20:40 spybotsd14.exe -rw-rw-rw- 1 user group 4951 Dec 20 15:18 vvs01_486400002bcd.pdfFilezilla:
drwxr-xr-x 1 ftp ftp 0 Apr 22 11:46 hermesftp-0.3 -rw-r--r-- 1 ftp ftp 2327 Mar 29 14:04 slapd.conf
doPrintFileInfo
in class AbstractFtpCmdList
out
- The output stream.file
- The filectx
- The FTP context.
java.io.IOException
- Error on data transfer.public boolean isAuthenticationRequired()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |