I've noticed that the normalize(File) method in FileUtils requires that the File to normalize is absolute. I was wondering what the reason is for this reason. Would it be too complex to normalize a relative path on Windows systems?
I think it makes perfectly sense to normalize a path like "./foo" into "foo" or "foo/bar/.." into "foo". Even a path like "../foo" could be normalized using the system property "user.dir", but it could also cause an Exception to be thrown as the absolute path "/../foo" would (a Unix system would even normalize that as "/foo"). The reason I'm askin is because I wanted to reuse the code in normalize which handles ".." and "." path segments. But maybe I should copy and paste instead. -- knut