Click or drag to resize
FindFile Class
This is a wrapper around Win32's FindFirstFile and FindNextFile. When VRS moves over to .NET 4 we can get rid of this.
Inheritance Hierarchy
SystemObject
  VirtualRadar.InteropFindFile

Namespace: VirtualRadar.Interop
Assembly: VirtualRadar.Interop (in VirtualRadar.Interop.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class FindFile

The FindFile type exposes the following members.

Constructors
  NameDescription
Public methodFindFile
Initializes a new instance of the FindFile class
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetFiles
Returns a list of files in a folder.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

Before .NET 4.0 the DirectoryInfo.GetFiles() method would read all of the files in a folder in one go but it would lazily read the attributes, lengths etc. of those files. When reading the names and last modified dates of 7500 files across the network using DirectoryInfo it was taking a minute in 3.5 and a couple of seconds in 4.

I need it to be very fast but I can't justify switching the product over to .Net 4.0 just for that, so instead I've done this wrapper around Win32's FindFirstFile / FindNextFile. When I do move VRS onto .Net 4 I can probably ditch this. Also, if VRS is being ported to some other platform this can probably be reimplemented in C# using a DirectoryInfo.

See Also