Directory Sizes and Performance

F

Flinky Wisty Pomm

Hi all,

I need to regularly traverse a large networked file system and return
a list of directories and their respective sizes. The file system is
large enough that performance is a serious concern.

As well as the recursive [File/Directory]Info solution, I've seen
reference to using the FileSystemObject or calls to FindFirstFile/
FindNextFile via COM interop.

Does anybody know the fastest way of doing this in .Net?

-- Bob
 
G

Guest

Whatever you do, do not use COM interop if you care for performance. I
believe there are some classes in BCL that can retrieve information u need ,
like querying AD (active directoy) that type of thing.

HTH
 
G

G Himangi

The File/DirectoryInfo and other classes like
Directory.GetFiles/GetDirectories also use FindFirstFile/FindNextFile via
P/Interop. In the case of FileInfo, these are used once for each FileInfo.
In case of GetFiles/GetDirectories, these are used once for each
enumeration.

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top