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. .NET (Core and Framework)
  4. a question about how .NET apps dealing with filesystem failing

a question about how .NET apps dealing with filesystem failing

Scheduled Pinned Locked Moved .NET (Core and Framework)
helpquestioncsharp
8 Posts 5 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.
  • A Offline
    A Offline
    alexyxj
    wrote on last edited by
    #1

    can anyone help explain what might happen to a .NET application if file system crash? Simply put, should the apps pop up warning/error reminding that file system is carshed? How does your apps deal with file system crash? Please help answer, many thanks.....

    L J A 3 Replies Last reply
    0
    • A alexyxj

      can anyone help explain what might happen to a .NET application if file system crash? Simply put, should the apps pop up warning/error reminding that file system is carshed? How does your apps deal with file system crash? Please help answer, many thanks.....

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      What do you mean by "file system crash", and how do you think the app could recognise it?

      One of these days I'm going to think of a really clever signature.

      A 1 Reply Last reply
      0
      • L Lost User

        What do you mean by "file system crash", and how do you think the app could recognise it?

        One of these days I'm going to think of a really clever signature.

        A Offline
        A Offline
        alexyxj
        wrote on last edited by
        #3

        for example, a designated folder got changed, not able to write into it, the system shall pop up error message, right? so I have to make specific error exception/message for this kind of case, otherwise the system just gave general error message, am I right?

        L P 2 Replies Last reply
        0
        • A alexyxj

          for example, a designated folder got changed, not able to write into it, the system shall pop up error message, right? so I have to make specific error exception/message for this kind of case, otherwise the system just gave general error message, am I right?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          You would need to implement FileSystemWatcher, take a look at these links[^].

          One of these days I'm going to think of a really clever signature.

          1 Reply Last reply
          0
          • A alexyxj

            for example, a designated folder got changed, not able to write into it, the system shall pop up error message, right? so I have to make specific error exception/message for this kind of case, otherwise the system just gave general error message, am I right?

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            As the inability to save to a certain location is a predictable exception (e.g. the user attempts to save into the Windows folder on Windows 7 when running with normal permissions), it's always a good idea to protect against this type of exception.

            *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

            "Mind bleach! Send me mind bleach!" - Nagy Vilmos

            CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

            1 Reply Last reply
            0
            • A alexyxj

              can anyone help explain what might happen to a .NET application if file system crash? Simply put, should the apps pop up warning/error reminding that file system is carshed? How does your apps deal with file system crash? Please help answer, many thanks.....

              J Offline
              J Offline
              jschell
              wrote on last edited by
              #6

              alexyxj wrote:

              can anyone help explain what might happen to a .NET application if file system crash?

              In general - no.

              alexyxj wrote:

              How does your apps deal with file system crash?

              Whatever the business requirements suggest and reasonable extrapolation from that. For example I don't try to do anything at all about the file system filling up for a server. Can it happen? Yes. If it does what can I do? Nothing. I do however expect that any reasonable operations setup would take into account file system monitoring. As another example if I can't read a configuration file that the server requires on start up then besides logging an error I can do one of the following - Start with default values. - Exit the server. The choice depends on what was supposed to be in the configuration file that I was reading. (Note that a logging solution MUST be implemented such that a logging failure does not stop the application from running.) A stand alone user application should probably do something different. If it cannot read/write to the fle system then it should report that to the user.

              1 Reply Last reply
              0
              • A alexyxj

                can anyone help explain what might happen to a .NET application if file system crash? Simply put, should the apps pop up warning/error reminding that file system is carshed? How does your apps deal with file system crash? Please help answer, many thanks.....

                A Offline
                A Offline
                alexyxj
                wrote on last edited by
                #7

                Thanks Richard/Pete/jschell, you guys provided very helpful knowledge, appreciate!

                K 1 Reply Last reply
                0
                • A alexyxj

                  Thanks Richard/Pete/jschell, you guys provided very helpful knowledge, appreciate!

                  K Offline
                  K Offline
                  krunal380
                  wrote on last edited by
                  #8

                  :(

                  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