Is a (local) file path an URI?

C:/Folder and /server/Folder/ are file paths.

http://example.com/ is a URL, which is a URI sub-type, so you could mark it as a URI but not the other way around (like how squares are rectangles but not vice versa).

Of course, here you have posted a clear, simple example. When discussing the distinction between URI and URL, not only is the answer not clear cut, it is also disputed. I recommend taking a look at this thread and the answers posted in it for clarification. Generally though, it is mostly agreed that the main difference is that URLs provide an access method (such as http://).

So if we were to convert your first file path into a URL it would become the following (note the addition of the access method):

file:///c:/Folder/test.txt

If you modify all your file paths to include an access method like in my example, then it will be okay for you to mark them as URIs.

Tags:

Url

Uri

Path