Check whether a folder is a local or a network resource in .NET
Posted
by rwmnau
on Stack Overflow
See other posts from Stack Overflow
or by rwmnau
Published on 2010-03-16T14:50:20Z
Indexed on
2010/03/16
15:01 UTC
Read the original article
Hit count: 239
Is there a quick way to check whether a path I have is on a local disk or somewhere on the network? I can't just check to see if it's a drive letter vs. UNC, because that would incorrectly identify mapped drives as local. I assumed it would be a boolean in the DirectoryInfo object, but it appears that it's not.
I've found classic VB code to do this check (through an API), but nothing for .NET so far.
© Stack Overflow or respective owner