If I have a string which could be either a file or a URL, is there any existing clever method I could use to differentiate them?
For instance:
- /Users/user/Documents/mydoc.txt -> path
- c:\Program Files\myapp\mydoc.doc -> path
- https://mywebsite.com/mydoc.txt -> url
- ftp://myserver.com/myfile.txt -> url
This is to load a designer UI file, so I need to make a local temporary copy of the remote file. So the bottom line is to know when I need to download the file.