-
July 2nd, 2011, 02:17 PM
#1
Merging local and remote folders.
Hello everybody! I would like to write an application that makes Windows see the contents of a remote and local folders when accessing a local one. That is, if I have a remote folder with files a.txt and b.txt, and a local folder with files c.txt and d.txt, what I would like to do is that when I open the local folder with explorer I see the 4 files a/b/c/d.txt.
The remote folder is shared with CIFS.
Is it already done? Can someone give me a clue on how to start?
Thanks a lot in advanced!!!
-
July 3rd, 2011, 04:55 AM
#2
Re: Merging local and remote folders.
for this there is already an app ( Drop box ) , however you can start with this
Code:
vector<string>localfiles // this holds list of local file.
vector <string>remotefiles // this list hold remote files.
then you can write file watched class this runs it it own thread to watch changed made to the remote and local file folder ( assuming that ) you have either some RPC / FTP way of communication this thee remote folder ,
so it simple terms if a file exist in remote folder and is not in the list of local folder then download it to local folder and then update the list of the local folder , same for the remote.
Of course your file watcher class would have incorporate Events for deletion , modify and Creation of files on the remote and local folders.
-
July 3rd, 2011, 06:27 AM
#3
Re: Merging local and remote folders.
Thans for your replay aamir121a!
I think I did not explain what I want to do clear enough... I want to see and access both the contents of a local and remote folders, but without copying anything, just as if the two folders were one (ignoring file duplication issues, and things like that). I could access the remote folder using SAMBA/CIFS, so there is no need to copy anything.
As far as I now Dropbox can't do this...
Thanks!
-
July 3rd, 2011, 08:10 AM
#4
Re: Merging local and remote folders.
there is no way in SMB / SAMBA to do this , if you want to visualize file from remote and local as one then yop have write a custom control ( best to start with QT or wxwidgets) I do not know what level of C++ programming you do however , principle is still the same ,
one list for remote other for local , control should be able to display them as one file , then you would have to you can take a tree widget and try to extend it some thing like this
http://www.ajaxline.com/best-javascript-tree-widgets
although the widget here is in Javascript , concept is still the same , start with root node and then expand it from there to incorporate remote and local file listing .
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|