have a look here for the full syntax: http://en.wikipedia.org/wiki/File_URI_scheme
for unix-like systems it will be as @Alex said file:///your/file/here whereas for Windows systems would be file:///c|/path/to/file
To convert to the old-school URL class (why?), add .toURL(). Note there is a difference in the string output. The modern URI::toString begins with file:/// (the traditional URL syntax) while the nearly-deprecated URL::toString with file:/ (the modern URI syntax). Weird 🤷