Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 885893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:58:56+00:00 2026-05-15T12:58:56+00:00

I have a program that’s watching for changes to certain files in a list

  • 0

I have a program that’s watching for changes to certain files in a list of folders, including children (if a folder is watched, it will watch all children). I want to add the ability to exclude certain children from this process, but I’m not sure how best to process it or store the “Rules” for this. For example, here’a a tree I might watch:

Root
  Folder1
    SubFolder1
      File1
      File2
  Folder2
    File3
    File4

I want to allow the user to select a folder (like “Root”), and it automatically selects all the children. If they uncheck a folder (like Folder1), I want to uncheck all the children of that one, but then if they check a child of a child (like File1), I want to check all its children (or, in this case, just watch File1, since it has no children).

I picture that I’ll store this data as a list of nodes at which the user has taken some kind of action (either + or -), and walk down the folder list, one level at a time, until I get to a node where the user has taken a different action, then continue to walk into the folders/files further, checking at each step to see if the user has taken some action on that node in particular, and then propagating it to all the sub-nodes. If a new folder/file appears under a watched node, I want to start to watch it, but if it appears under an ignored node, I’ll ignore it.

Do I just store each “actioned” folder/file, as well as the action (watch/ignore) that the user took, and then reconstruct the whole tree every time? Is there a more efficient way to do this that I’m not picturing?

I’m happy to clarify if my current explanation of how I picture this unclear. Also, I’m using .NET, but I’m more interested in the general process – I’ll work out the implementation.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T12:58:57+00:00Added an answer on May 15, 2026 at 12:58 pm

    You should be able to accomplish this with the TreeView class. From my experience, you’ll need to add a bit of logic in there to update parent and child nodes once a node is selected, but this can be accomplished by attaching a handler to one of the TreeView events. In an application I built in the past, I beleive I just used the Click event, but after rethinking that, that “AfterSelect” might have been a better option. However, there might be better events available in the actual TreeNode class, but I have yet to look into these. Hopefully, this post will at least get you started in the right direction.

    On a side note, the TreeView class is not marked as serializable. However, you could serialize the root TreeNode’s of the TreeView. Therfore, you could save the selected options through either binary serialization, XML serialization, or any other method of your choice.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 507k
  • Answers 507k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer To start off, you might want to check what fonts… May 16, 2026 at 4:09 pm
  • Editorial Team
    Editorial Team added an answer When adding updateCheck="false" to your <ehcache /> element doesn't work,… May 16, 2026 at 4:09 pm
  • Editorial Team
    Editorial Team added an answer Yes, no problem. They can be installed side-by-side (and Visual… May 16, 2026 at 4:09 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a program that reads a raw list of in-game entities, and I
I have program that has a variable that should never change. However, somehow, it
I have program that the number of classes loaded there is constantly rising. How
I have program that needs to parse XML that contains character entities. The program
I have program that saves unique images that are related to unique database fields
I have program that runs fast enough. I want to see the number of
I have program, that must interact with a console program before my program can
have a program that fades out on mouse leave event. but the problem is
I have program output that looks like this (tab delim): $ ./mycode somefile 0000000000000000000000000000000000
I have a program that spits out both standard error and standard out, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.