Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

VFS Folder

Moderators: larsivi kris

Posted: 11/20/07 21:50:05

Is the current tango FileFolder? complete and compliant to this because I look in the header file and I try to look at the code to help me implement an WebClient? for VFS and some of the stuff I see in there I see not in the header file. I know VfsFolder? does implement those things but it's an interface so how in the world does it work for FileFolder?. I need to get this so I can make a FtpFolder?. I am learning a lot by doing this and Dinstaller. With the help of many(few)(depends on how many decide to help me figure out stuff) I will know enough to get us a WebClient? indifferent to HTTP/FTP. I already have one but it's not Vfs compliant and only does downloads. Please ask and suggest here in the forums as I do not answer emails often.

Lester L. Martin II

Lester L. Martin II

Author Message

Posted: 11/20/07 23:44:05

Could you be more specific in what you don't see where? :) I believe the implementation implements what is documented at the very least :)

As for your plans - I would highly recommend not creating a WebFolder supporting both ftp and http (webdav), but rather separate them. The protocols have little, if anything in common, and they both have enough features of various sorts that at some point probably could be exposed in the specific folder type. For instance could the autoversioning support in webdav be supported in the WebDavFolder (or a VersionedWebDavFolder), something that as far as I know wouldn't make sense when looking at FTP. That there is a client somewhere (probably not in Tango itself) that combines both, I don't see as a problem. I believe other VFS implementations also separate FTP and WebDav?. Just to make things more interesting / worse - remember that there are encrypted variations of those protocols too (sftp and WebDav? with SSL (https)).

This separation will make each module easier to maintain (they are not likely to have very much code in common in any case), and they can be developed independently from each other. Also, they will each have dependencies into various parts of tango.net, and dividing them into two folders will reduce coupling. Many see ftp as a technology ripe for deprecation anyway, and it would be unwise to couple that with something more vital, such as WebDav? is.

Posted: 11/21/07 00:22:41

What is WebDav?. The only reason I've named it WebClient? is because it does http and ftp !webdav(*unless webdav is http). Did you click the this in my top post. Well it shows you FileFolder? getting a file and mapping it to a VfsFile?(or something like that) and well I looked in the code in my dmd installation and failed to find the implementation of the file method. It is interfaced(*something like that) from a a VfsFolder? which has a definition of it though so I was wondering would it be safe to assume that which isn't implemented in file folder is safe for me to not implement it in my web client.

I have no problem seperating Http and FTP clients though I think it would be nice if a user just gave you an url and it decided which to use.

Um is sftp and shttp supported by the FTPConnection and HttpClient? classes. If so I think it should work properly with webclient or separated http ftp clients if you so wish to use sftp and shttp.

Some stuff I don't understand and sometimes I don't know exactly what to implement and what has been implemented. As far as web dav there was no plan for me to do that in the begining. If the protocol is as easy as ftp this will take me a couple months (because I can find cases in which ftp is hard though they are not common and I said that based on oppinion because I have tried to run a ftp server and boy did it die quick).

It always seems everytime I take on a new project I dig into D a little deeper and its libraries especially so as to find the way to get things done. I am a hobby programmer and this is for fun. I love d as its similarity to C# is spectacular(this is the other language I know and wish I hadn't learned because non native code is slow on my computer at least which is about one year old) and its native code compilation makes it a perfect.

Umm all shttp's i meant https just saw that and am too lazy to edit them one by one. If you believe ftp is expiring and consider WebDav? more important I'll try to find out enough about web dav to write an implementation though this would be a new tree to bark up so to speak.

Well thanks for the help and future help, Lester L. Martin II

Lester L. Martin II

Posted: 11/21/07 09:04:40

lmartin92 wrote:

What is WebDav?. The only reason I've named it WebClient? is because it does http and ftp !webdav(*unless webdav is http).

WebDav? is an extension to HTTP (via new methods like PROPGET, REPORT, etc), to make it possible to look at a remote http location as a file system. I believe the download itself, the transfer of data, still is done via the common HTTP methods.

Did you click the this in my top post. Well it shows you FileFolder? getting a file and mapping it to a VfsFile?(or something like that) and well I looked in the code in my dmd installation and failed to find the implementation of the file method. It is interfaced(*something like that) from a a VfsFolder? which has a definition of it though so I was wondering would it be safe to assume that which isn't implemented in file folder is safe for me to not implement it in my web client.

Do you mean final VfsFile file (char[] name) {} defined on line 131 of !FileFolder? An interface cannot have an implementation, so all those functions will need to be implemented in some fashion for the folder implementation to work.

I have no problem seperating Http and FTP clients though I think it would be nice if a user just gave you an url and it decided which to use.

Yes, but this should be handled at a different level. It may make sense to put it in the VirtualFolder implementation, at least that was how it was in the previous iteration of the VFS system.

Um is sftp and shttp supported by the FTPConnection and HttpClient? classes. If so I think it should work properly with webclient or separated http ftp clients if you so wish to use sftp and shttp.

No, neither https nor sftp is supported in Tango at this time. Note that I'm pretty certain that they use different encryption protocols, ssh for sftp and ssl for https. I believe you shouldn't need to worry about the secure versions from the onset - a later solution may add support by creating for instance a !SFtpFolder subclass of FtpFolder.

Some stuff I don't understand and sometimes I don't know exactly what to implement and what has been implemented. As far as web dav there was no plan for me to do that in the begining. If the protocol is as easy as ftp this will take me a couple months (because I can find cases in which ftp is hard though they are not common and I said that based on oppinion because I have tried to run a ftp server and boy did it die quick).

It always seems everytime I take on a new project I dig into D a little deeper and its libraries especially so as to find the way to get things done. I am a hobby programmer and this is for fun. I love d as its similarity to C# is spectacular(this is the other language I know and wish I hadn't learned because non native code is slow on my computer at least which is about one year old) and its native code compilation makes it a perfect.

Umm all shttp's i meant https just saw that and am too lazy to edit them one by one. If you believe ftp is expiring and consider WebDav? more important I'll try to find out enough about web dav to write an implementation though this would be a new tree to bark up so to speak.

Well thanks for the help and future help, Lester L. Martin II

Lester L. Martin II

Then please do the FtpFolder? first :) I'm pretty sure it will be much easier to do than WebDav?, as you should be able to use the ftp client in Tango for most of what is needed. I don't expect FTP do disappear tomorrow, just that we don't want to couple FTP and HTTP/WebDav too much.