?
Solved

Synchronize files/directories via HTTP

Posted on 2001-06-11
3
Medium Priority
?
202 Views
Last Modified: 2011-04-14
Can anyone tell me Is there any algorithm or source-code that synchronize files/directories via HTTP.

thanks.

Dan
0
Comment
Question by:walkdan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 6

Accepted Solution

by:
snoegler earned 400 total points
ID: 6176502
There is the same algorithm as there is for synchronizing files via serial cable or via network or ...

HTTP offers to possibility to
- read only the HEADer information of a file
- GET a file
- PUT a file ( which is only supported - if at all - after being authenticated )

which are all methods you need to forward synchronize _files_. To my knowledge, there is no standardized HTTP command to create a directory, to remove a directory or to remove a file.

1. For each directory in the local directory, perform this 2. For each file in the local directory, use the HTTP HEAD command to test if it is available on the destination machine. If it is, compare the date/time of the file (which is also returned by HEAD). If equal, you should be able to assume that is hasn't been modified, and continue at 4.
3. Upload the file via HTTP PUT.
4. If there are any files left in the current directory, continue with 2.

This leaves all not anymore used files and directories on the server. To get around this, you could use FTP which allows all of the tasks to be performed; let me know if you want that.
0
 
LVL 11

Expert Comment

by:griessh
ID: 6814514
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to accept "snoegler" comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points.
The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

Please do not accept this comment as an answer!
======
Werner
0
 
LVL 5

Expert Comment

by:Netminder
ID: 6833233
Per recommendation comment force/accepted by

Netminder
Community Support Moderator
Experts Exchange
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question