FXP.One icon indicating copy to clipboard operation
FXP.One copied to clipboard

stat -al implementation for the FXP.One engine and wfxp client

Open j1mi opened this issue 6 years ago • 3 comments

This is my very first pull request on github so please forgive me if I'm not doing it correctly. I tried to implement 'stat -al' dirlisting for FXP.One and wfxp.

stat -al uses the ftp control connection for transferring the dirlist... so it doesn't need to PORT or PASV etc... which usually results in a faster dirlist and obviously faster dirlist might be very usefull in some situations where uploading as much files as soon as possible is wanted ;-)

First I made an attempt on implementing stat -al in a fork of fxp.one: https://github.com/zut45k/FXP.One but as I'm still learning git I screwed up so created a new fork: https://github.com/j1mi/FXP.One and will try a pull request now.

The engine was modified to support stat -al, USE_STAT is added in siteprefs and I modified the webclient to support use_stat in the siteconfig.

j1mi avatar Jul 20 '18 12:07 j1mi

Thanks! I don't think stat is ever listed in the FEAT reply, I can't find anything about it in the ftp rfc's. Also stat has 2 functions, without parameters it's a request for the server's status with parameters it acts like a LIST with the exception that the dirlist data is sent back over the ftp controlconnection. And from what I read about stat not all servers implement it in the same way so I don't know if it's a good idea to assume yes as default.

j1mi avatar Jul 24 '18 09:07 j1mi

You will not find STAT listing in RFC - its a scene hack addon :) I remember reading about the proposal some 20 years ago, but damned if I can find it now. Doesn't look like they added STAT to FEAT output - what a shame, missed opportunity.:)

lundman avatar Jul 24 '18 10:07 lundman

found it, wasn't awake yet this morning I guess :-)

https://tools.ietf.org/html/rfc959#page-33

STATUS (STAT)

        This command shall cause a status response to be sent over
        the control connection in the form of a reply.  The command
        may be sent during a file transfer (along with the Telnet IP
        and Synch signals--see the Section on FTP Commands) in which
        case the server will respond with the status of the
        operation in progress, or it may be sent between file
        transfers.  In the latter case, the command may have an
        argument field.  If the argument is a pathname, the command
        is analogous to the "list" command except that data shall be
        transferred over the control connection.  If a partial
        pathname is given, the server may respond with a list of
        file names or attributes associated with that specification.
        If no argument is given, the server should return general
        status information about the server FTP process.  This
        should include current values of all transfer parameters and
        the status of connections.

j1mi avatar Jul 24 '18 15:07 j1mi