Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Unreliability of the FileSystemWatcher

Unreliability of the FileSystemWatcher

Scheduled Pinned Locked Moved C#
databasec++lounge
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I have a system that generates files and writes them to a local directory on the same comuter. The director is mnitored by a FileSysemWatcher that stores the name f the file to a database. The probles is that the FSW, as appeares to be in a completely random manner- sometimes ignores newly created files. If I cut the files to another directory and then manualy copy them back- the event does fire. What can account for such unriliable behavior. Obviously, the monitoring flag is on. Moreover, I doubt that I am having trouble with buffer overflow because I noticed this wiered behavior when not more than 2 or three files were generated. I cannot relocate to db logic to the internals f the system that actually generates the files (It is a C++ library and I dont have the code). Solutions and elegant workarounds would be appreciated. Tahnx. int a; if(a > 0) {...}

    V A 2 Replies Last reply
    0
    • L Lost User

      I have a system that generates files and writes them to a local directory on the same comuter. The director is mnitored by a FileSysemWatcher that stores the name f the file to a database. The probles is that the FSW, as appeares to be in a completely random manner- sometimes ignores newly created files. If I cut the files to another directory and then manualy copy them back- the event does fire. What can account for such unriliable behavior. Obviously, the monitoring flag is on. Moreover, I doubt that I am having trouble with buffer overflow because I noticed this wiered behavior when not more than 2 or three files were generated. I cannot relocate to db logic to the internals f the system that actually generates the files (It is a C++ library and I dont have the code). Solutions and elegant workarounds would be appreciated. Tahnx. int a; if(a > 0) {...}

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      Hrusha42 wrote:

      FSW, as appeares to be in a completely random manner

      Do you have any other system processes that is interfering with it?

      Vasudevan Deepak Kumar Personal Homepage Tech Gossips

      1 Reply Last reply
      0
      • L Lost User

        I have a system that generates files and writes them to a local directory on the same comuter. The director is mnitored by a FileSysemWatcher that stores the name f the file to a database. The probles is that the FSW, as appeares to be in a completely random manner- sometimes ignores newly created files. If I cut the files to another directory and then manualy copy them back- the event does fire. What can account for such unriliable behavior. Obviously, the monitoring flag is on. Moreover, I doubt that I am having trouble with buffer overflow because I noticed this wiered behavior when not more than 2 or three files were generated. I cannot relocate to db logic to the internals f the system that actually generates the files (It is a C++ library and I dont have the code). Solutions and elegant workarounds would be appreciated. Tahnx. int a; if(a > 0) {...}

        A Offline
        A Offline
        Ami Bar
        wrote on last edited by
        #3

        Hi, You have to set the InternalBufferSize property of the FileSystemWatcher, or else you loose events. Look at the MSDN for more information. Ami

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups