0

Is there any workaround for dealing with the limitation of getFiles and getDirectories to return the content even if they reachs a access denied file/folder?

How can I make then return the filesystem tree with all files/folders a user has access permissions at least for reading?

Guilherme Longo
  • 2,278
  • 7
  • 44
  • 64

1 Answers1

1

There are a couple implementations of this. Basically, you can't use the default one because it will throw an exception and stop when a user has insufficient permissions. I usually see people list all the directories, and then try each one and catch any exceptions.

Recursive File Search in .net

Community
  • 1
  • 1
Origin
  • 1,943
  • 13
  • 33
  • I have implemented with Recursive File Search and the problem still persist. I found a way just enabling users to use the first level folder from a Logical Drive.... Thanks – Guilherme Longo Nov 28 '12 at 20:02