directory - C# How to know if a given path represents a root drive? -


how can know if given directory root drive?

(aside checking if path equals "a:", "b:", "c:", etc.)

check if directoryinfo.parent null or not

directoryinfo d = new directoryinfo(""); if(d.parent == null) { isroot = true; } 

you can root using directoryinfo.root;


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -