Gets or sets the internal buffer size.
[Visual Basic] Overridable Public Property InternalBufferSize As Integer [C#] public int InternalBufferSize {virtual get; virtual set;} [C++] public: __property virtual int get_InternalBufferSize(); public: __property virtual void set_InternalBufferSize(int); [JScript] public function get InternalBufferSize() : int; public function set InternalBufferSize(int);
The internal buffer size. The default is 8192 (8K).
The buffer can be set to anything above 4096 (4K), but for best performance, it should be a multiple of 4K on x86 machines.
The system notifies you of file changes, it stores those changes in a buffer that the component creates and passes to the Application Programming Interfaces. If there are a lot of changes in a short amount of time, the buffer can overflow. This causes the component to lose track of changes in the directory, and it will only be able to provide a blanket notification. Increasing the size of the buffer is expensive, as it comes from non-paged memory that cannot be swapped out to disk, so you want to keep the buffer as small as possible. To avoid a buffer overflow, use the ChangedFilter, Filter, IncludeSubdirectories, and Target properties to filter out unwanted change notifications.
FileSystemWatcher Class | FileSystemWatcher Members | System.IO Namespace | ChangedFilter | OnError | Filter | IncludeSubdirectories | InternalBufferOverflowException | Target