Creating hidden folders

前端 未结 5 1059
-上瘾入骨i
-上瘾入骨i 2020-12-13 17:52

Is there any way that I can programmatically create (and I guess access) hidden folders on a storage device from within c#?

5条回答
  •  北海茫月
    2020-12-13 18:18

    Code to get only Root folders path.

    Like If we have C:/Test/ C:/Test/Abc C:/Test/xyz C:/Test2/ C:/Test2/mnp

    It will return root folders path i.e. C:/Test/ C:/Test2/

                int index = 0;
                while (index < lst.Count)
                {
                    My obj = lst[index];
                    lst.RemoveAll(a => a.Path.StartsWith(obj.Path));
                    lst.Insert(index, obj );
                    index++;                    
                }
    

提交回复
热议问题