WebNFS Developer's Guide

What Happens If a Relative Name Looks Like a URL?

An ambiguity could arise if a relative name looks like a URL. For instance, if the current directory of the Java Runtime contained a directory nfs: then a reference to a sub-directory nfs:/xxx/yyy might be intended, but the path would be evaluated as an NFS URL. If a filesystem that implements the URL scheme is currently loaded then the evaluation will fail and an error will be returned. To avoid this ambiguity the file must be identified by its absolute path,that is, the complete URL for the file. A short reference to the "native" scheme is . (period), so that a path beginning with .: is identified as a URL for a native path. If the apparent URL cannot be identified (no implementation available) then the name will be evaluated correctly within the directory indicated by the current URL context. Fortunately, file names with an appended colon are not popular. The only exception is the DOS disk letter naming, though most URL schemes use an identifier longer than a single letter -- so ambiguity is unlikely to be a problem.