Re: Download File chunks - WeOnlyDo Discussion board

Re: Download File chunks (General questions)

by Bernd, Monday, November 20, 2006, 15:23 (6359 days ago) @ wodSupport

Kreso,

okay, this should work but is a little bit ugly . :-)

The SHA-1 was just an example. I thought of extending a standard protocol (FTP) to support some special behaviour. What I want to develop ist a file-sync application which works over FTP and/or HTTP to sync two directories. So to check if two files area identical I need to retrieve some information about them. This could be the time stamp or for example the SHA-1 checksum. I thought of handling all this with special filenames:

FTP request test.txt -> Get test.txt content
FTP request SHA1:test.txt -> Get SHA-1 string of test.txt
FTP request test.txt:2000:3000 -> Get byte 2000-3000 of test.txt

If you'd implement the possibility to replace the standard file stream this could be easily done. It my be sufficient to implement an IFtpFile interface with some member functions: GetFileSize(), ReadFile(nStartPos, nCountBytes), ... Any function could pass to the original function if no special functionality is required.

This way out FTP server would work as any standard FTP server but has an extension for or own client. There should not be any compatibilty issues here.

Bernd


Complete thread: