Is there an easy way to convert a path to a url?

Just trying to save myself the trouble of actually having to do it via multiple string functions.

Thanks.