Go Back   FlashFXP Forums > > > >

Suggestions Post suggestions for upcoming versions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 12-29-2002, 03:23 PM   #1
darkone
Disabled
FlashFXP Registered User
ioFTPD Administrator
 
darkone's Avatar
 
Join Date: Dec 2001
Posts: 2,230
Lightbulb Directory caching

Most graphical ftp clients are supporting directory caching nowdays (It's a great feature, as it reduces work/traffic done by both server & client) - However due lack of one simple ftp command, caching is currently very inaccurate.
What I'm suggesting is to add 'DATE' command (similar to SIZE) to read file's/directory's timestamp via control channel. This would allow client to determinate with simple check, wheter contents of directory have changed since last cache update.

Client Command: DATE <filename>
Server Response: 213 <file time low-order dword> <ft high-order dword> <system time low-order dword> <st high-order dword>

Client should turn caching off, if server replies with error on the first try (same as with REST).


Here are examples how it could/should be implemented:

Client enters directory for the first time:

CLIENT => SERVER: DATE . ("." = current directory)
SERVER => CLIENT: 213 0 0 0 1
... Client requests for directory list ...

Client enters cached directory (unmodifed):

CLIENT => SERVER: DATE .
SERVER => CLIENT: 213 0 0 0 2 (Client compares cached values to with new values - and notices directory has not changed)
... Client waits for next command ...

Client enters cached directory (modified):

CLIENT => SERVER: DATE .
SERVER => CLIENT: 213 1 0 0 2
... Client requests for directory list ...

*Note* Directory should not be cached, if 'System time' in server response is equal to or less than 'File time' - as it's possible (not very likely) that contents have changed since.

Server that doesn't support 'DATE':

CLIENT => SERVER: DATE .
SERVER => CLIENT: 500 'DATE': Command not understood
... Client requests for directory list ...


Any questions/comments?
darkone is offline  
 

Tags
client, command, date, directory, server


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:54 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)