I do not think it can be done. File URLs require a mount point on the server, for example:
file://hostname/path/to/file
Thus, a file on the file system simply omits the host name component (explains 3 leading slashes)
file:///path/to/file
The relative path, on the other hand, assumes a starting position in the remote file system ... Something that cannot be supported if you want the URL to be unambiguous
source share