This method will: * Uppercase the drive letter if there is one. * Remove redundant slashes after the drive spec. * Resolve all ./, .\, ../ and ..\ sequences. * DOS style paths that start with a drive letter will have \ as the separator.
Other DOS considerations: when a drive letter is supplied and there is no separator immediately following, the meaning is different. Supplying the separator here yields the wrong filename. In this case the meaning is that the remaining filename beyond the colon is relative to the current directory for that drive. As we resolve . and .. components of the filename, I think we should be resolving this to the full path intended. when a single separator leads the path, the path is relative to the root of the current directory. I think we should be resolving that directory as well to be pointing to the correct file. OR it may be that we should detect these conditions as NOT being absolute pathnames on DOS. File.isAbsolute() returns false in these cases. However, we should still provide some means of obtaining the absolute forms of these names as well. The only reason I bring it up rather than just making the necessary changes is (1) that there is a choice of which to do, and (2) that the first alternative will break existing testcases (Project.testResolveFile at least). No idea what the second (possibly more correct) alternative will break. Thoughts? -Matt __________________________________ Do you Yahoo!? The all-new My Yahoo! - What will yours do? http://my.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]