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
Post a Comment