[Qt-interest] How to tell a file is on the local network.

Arnold Krille arnold at arnoldarts.de
Sat Jan 1 15:51:22 CET 2011


On Saturday 01 January 2011 14:00:18 Konrad Rosenbaum wrote:
> It is rather simple to check a URL: get the host name from it - if it is
> empty or "localhost" then the resource is local(*), otherwise it is on the
> network.

If the url starts with one of the names of the local machine, its also local. 
Well, it might be unless that directory is again mounted over network and only 
published by a local webserver.

To the OP: Why does it matter where the file is? If you can access it for 
reading, you can read it. If you can access it for writing, you can write it. 
If you want to make your users happy, your app doesn't care whether its 
editing local files on disk or remote files via 
ftp(s)/sftp/webdav(s)/whatever...

Have fun,

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110101/5f03827b/attachment.bin 


More information about the Qt-interest-old mailing list