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. Checking file changes

Checking file changes

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpcomjavascriptasp-netquestion
9 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.
  • J Offline
    J Offline
    Joao Vaz
    wrote on last edited by
    #1

    I have a ASP.NET application that needs to check for changes on the client side for a file. This file is constantly being changed and I need , that everytime the file is changed to open the file and check for new data to transmit to my ASP.NET app, so what do you advise ? Building a dotnet service(it's possible wihout com interop ?) that's is constantly checking the file on the filesystem,or using some javascript function using the filesystem object and a timer to check for changes of the file, or some other way ? Thanks in advance, Joao Vaz And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary.-Shog9 Remember just because a good thing comes to an end, doesn't mean that the next one can't be better.-Chris Meech

    S G 2 Replies Last reply
    0
    • J Joao Vaz

      I have a ASP.NET application that needs to check for changes on the client side for a file. This file is constantly being changed and I need , that everytime the file is changed to open the file and check for new data to transmit to my ASP.NET app, so what do you advise ? Building a dotnet service(it's possible wihout com interop ?) that's is constantly checking the file on the filesystem,or using some javascript function using the filesystem object and a timer to check for changes of the file, or some other way ? Thanks in advance, Joao Vaz And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary.-Shog9 Remember just because a good thing comes to an end, doesn't mean that the next one can't be better.-Chris Meech

      S Offline
      S Offline
      Stephane Rodriguez
      wrote on last edited by
      #2

      I am not aware of such stuff inside the .NET CLR. You've got dedicated functions in the WIN32 File I/O APIs, including ReadDirectoryChangesW, etc. Now this require WIN32 interop. Adding COM or ActiveX interfaces would allow you to execute it from Javascript code.

      J G 2 Replies Last reply
      0
      • S Stephane Rodriguez

        I am not aware of such stuff inside the .NET CLR. You've got dedicated functions in the WIN32 File I/O APIs, including ReadDirectoryChangesW, etc. Now this require WIN32 interop. Adding COM or ActiveX interfaces would allow you to execute it from Javascript code.

        J Offline
        J Offline
        Joao Vaz
        wrote on last edited by
        #3

        .S.Rod. wrote: I am not aware of such stuff inside the .NET CLR. You've got dedicated functions in the WIN32 File I/O APIs, including ReadDirectoryChangesW, etc. Thanks , I resorted to another technique , using win32 api on one client side app , and recording the data on the database on the Server side. .S.Rod. wrote: Now this require WIN32 interop. Oh well, perphaps on the 2nd version, they'll put the rest of the windows api on it (insert dreamer icon here...) Cheers,Joao Vaz And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary.-Shog9 Remember just because a good thing comes to an end, doesn't mean that the next one can't be better.-Chris Meech

        1 Reply Last reply
        0
        • J Joao Vaz

          I have a ASP.NET application that needs to check for changes on the client side for a file. This file is constantly being changed and I need , that everytime the file is changed to open the file and check for new data to transmit to my ASP.NET app, so what do you advise ? Building a dotnet service(it's possible wihout com interop ?) that's is constantly checking the file on the filesystem,or using some javascript function using the filesystem object and a timer to check for changes of the file, or some other way ? Thanks in advance, Joao Vaz And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary.-Shog9 Remember just because a good thing comes to an end, doesn't mean that the next one can't be better.-Chris Meech

          G Offline
          G Offline
          Giles
          wrote on last edited by
          #4

          Could have a look at System.IO.FileSystemWatcher Quote from a clever bloke : "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein

          J 1 Reply Last reply
          0
          • S Stephane Rodriguez

            I am not aware of such stuff inside the .NET CLR. You've got dedicated functions in the WIN32 File I/O APIs, including ReadDirectoryChangesW, etc. Now this require WIN32 interop. Adding COM or ActiveX interfaces would allow you to execute it from Javascript code.

            G Offline
            G Offline
            Giles
            wrote on last edited by
            #5

            This class implements the equivelent Win API calls to monitor a file, or change in a directory. System.IO.FileSystemWatcher Quote from a clever bloke : "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein

            S 1 Reply Last reply
            0
            • G Giles

              Could have a look at System.IO.FileSystemWatcher Quote from a clever bloke : "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein

              J Offline
              J Offline
              Joao Vaz
              wrote on last edited by
              #6

              Giles wrote: Could have a look at System.IO.FileSystemWatcher This resolves the things on the server-side, and since I already resolved the client-side problem :-) Thanks :cool: Cheers,Joao Vaz And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary.-Shog9 Remember just because a good thing comes to an end, doesn't mean that the next one can't be better.-Chris Meech

              1 Reply Last reply
              0
              • G Giles

                This class implements the equivelent Win API calls to monitor a file, or change in a directory. System.IO.FileSystemWatcher Quote from a clever bloke : "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein

                S Offline
                S Offline
                Stephane Rodriguez
                wrote on last edited by
                #7

                Yo! ;)

                G 1 Reply Last reply
                0
                • S Stephane Rodriguez

                  Yo! ;)

                  G Offline
                  G Offline
                  Giles
                  wrote on last edited by
                  #8

                  I'm guessing that the kitchen sink is in there somewhere. The .NET class lib seems to have everything, its just a case of finding it. :-D Quote from a clever bloke : "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein

                  S 1 Reply Last reply
                  0
                  • G Giles

                    I'm guessing that the kitchen sink is in there somewhere. The .NET class lib seems to have everything, its just a case of finding it. :-D Quote from a clever bloke : "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." - Albert Einstein

                    S Offline
                    S Offline
                    Stephane Rodriguez
                    wrote on last edited by
                    #9

                    What we are lacking is a Find option in Anakrino! ;) (unfortunately, I have tried to recompile this masterpiece but couldn't download everything required to do so).

                    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