
June 7th, 2004, 03:34 PM
|
 |
dont click here
|
|
Join Date: Jun 2002
Posts: 409
Time spent in forums: 7 h 35 m
Reputation Power: 7
|
|
|
Syncronizing directories algorithm
I am using Vb.net I need to sync 2 directories so here is my theory so far. I am a seeking a better solution on this idea so far.
I am a Java/PHP programmer so i will use the brackets its easier to outline code for me and im assumin for most of us as well.
syncDir(dirA, dirB){
loop through dirA{
if directory{
syncDir(newDir, dirB & newDir) //u get the idea here
}
else
if dirA.filedatetime < dirB.filedatetime{
copy dirA.file to dirB
}
}
}
now i was thinkin of calling this function as such
syncdir(dirA, dirB);
syncdir(dirB, dirA);
is there a better idea to get this done. I dont like the idea of going through both dirs twice. It doesnt seem efficent to me. If anyone can help thanks alot.
|