I have to confirm how the buffersize is working for the fileSystemWatcher.
I have found this explanation on google:

The FileSystemWatcher class works by capturing all of the relevant file and older changes and placing them into a buffer.
This is then processed one change at a time until all of the notifications have been dealt with and the buffer is empty. By default, the internal buffer has a size of eight kilobytes (8192 bytes). Each event can take up to sixteen bytes of the buffer for its data, not including the file name.

For the line:
Each event can take up to sixteen bytes of the buffer for its data, not including the file name.

First as I understand the buffer works like a queue system where then each event takes up to 16 bytes of the default 8192 buffer.

*** What is it that takes up to 16 bytes, could an event take less than 16 bytes ?

*** 8192 bytes = (8192 / 16 bytes) = 512 changes in the buffer/queue ?

*** If one of these 512 changes is done, there will then be place for 1 more event in the buffer/queue ?

(This to understand if I might/could need to increase the internalbuffer)
Thank you

Recommended Answers

All 2 Replies

Member Avatar for jencas

"The FileSystemWatcher class is found in the System.IO namespace". (from the same website as your citation...)

That seems to be .NET, so don't be astonished if your question leaves unanswered here.

>That seems to be .NET, so don't be astonished if your question leaves unanswered here.
This is the best forum to get answers on both C++/CLI and Managed C++.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.