From: rio4ruby Date: 2005-10-29T06:02:06+09:00 Subject: Re: rio.. graham wrote: > Still - my question stands - how DO you get rio to work with Windows > drive specifiers (in any format, UNC or mapped drive)? > Regards > Graham Sorry for being so tardy in my response, I was called away for a few weeks. I included a file doc/README_MSWIN32.txt in the distribution, which describes Rio's current status regarding drives on Windows. ----From doc/README_MSWIN32.txt in the distribution---- Currently support for MS Win paths involves simply ignoring the drive portion (C: etc) of paths returned by by the underlying ruby libraries (that's right, it just lops that sob right off) While this is clearly unacceptable behavior, it is unclear to the author whether support for paths that can not be represented per RFC1738 is a feature of interest to anyone. There is a relatively small amount of code that would have to change to add this support in the future, and such support may be included in a future release. For the time being, the subset of tests in 'test/mswin32.rb' do pass when running under the mswin32 port of ruby. By far the majority of the tests that are excluded are excluded because they use symlinks, not because of the differences in path representations. ----End of quote---- I really want Rio to support Windows file specifications, seamlessly. In fact, file-system independence was an early goal of Rio. My approach to file system independence is to use URLs in the underlying code, and to convert them to native paths as required before and after each low-level call. The advantage to this approach is that should I need to support additional file systems in the future, the only code that would have to be written is the conversion from and to the UNIVERSAL representation. And furthermore, since a URL is supposed to be universal, the conversion code would most likely already exist. This approach faltered when I discovered that RFC1738 does not include a way to represent Windows/DOS drive specifications. (I have been unable to find the RFC that documents Microsoft's extension that defines URLs that use a bar in place of the colon after the drive). Since file-system independence was an early goal, all the hooks are in place to add support for additional file systems. I would be very interested in your thoughts on what Windows support should include -- UNC, C:\, etc. If you could point me to the RFC, or other document that defines the mapping from and to a URL, I would be most grateful. Cheers, -Christopher