Groups | Blog | Home
all groups > dotnet framework > april 2007 >

dotnet framework : Directory Sizes and Performance


Flinky Wisty Pomm
4/30/2007 3:44:54 AM
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
Vijay
4/30/2007 2:32:06 PM
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

[quoted text, click to view]
G Himangi
5/2/2007 12:00:00 AM
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
---------



[quoted text, click to view]

AddThis Social Bookmark Button