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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Deny filesystem access

Deny filesystem access

Scheduled Pinned Locked Moved .NET (Core and Framework)
question
5 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.
  • Y Offline
    Y Offline
    Yevgeny Efter
    wrote on last edited by
    #1

    Hello! I am trying to write a simple application that monitors filesystem access, and denies access to specific folders. I know that there is a class named FileSystemWatcher, but it gives only monitoring abilities. Can I stop copying a file when I catch it? Thanks in advance!

    Have a nice day!

    O 1 Reply Last reply
    0
    • Y Yevgeny Efter

      Hello! I am trying to write a simple application that monitors filesystem access, and denies access to specific folders. I know that there is a class named FileSystemWatcher, but it gives only monitoring abilities. Can I stop copying a file when I catch it? Thanks in advance!

      Have a nice day!

      O Offline
      O Offline
      originSH
      wrote on last edited by
      #2

      if you want to protect a folder then use the acccess control stuff. All the permissions stuff is there for a reason :P

      Y 1 Reply Last reply
      0
      • O originSH

        if you want to protect a folder then use the acccess control stuff. All the permissions stuff is there for a reason :P

        Y Offline
        Y Offline
        Yevgeny Efter
        wrote on last edited by
        #3

        You didn't understand me. What I want is to catch file system events before they are executed. For example, if I try to copy a file, I want to catch it at the moment the user pressed "Paste", and before the file is being copied. I hope I can do it in .NET...

        Have a nice day!

        O 1 Reply Last reply
        0
        • Y Yevgeny Efter

          You didn't understand me. What I want is to catch file system events before they are executed. For example, if I try to copy a file, I want to catch it at the moment the user pressed "Paste", and before the file is being copied. I hope I can do it in .NET...

          Have a nice day!

          O Offline
          O Offline
          originSH
          wrote on last edited by
          #4

          No, I understand what you want to do. If you want to protect a folder you should use file system permissions. Why do you want to impliment your own system rather than use whats provided for you? Off the top of my head I can't think of any good reason to do so, but that doesn't mean there isn't one :P

          V 1 Reply Last reply
          0
          • O originSH

            No, I understand what you want to do. If you want to protect a folder you should use file system permissions. Why do you want to impliment your own system rather than use whats provided for you? Off the top of my head I can't think of any good reason to do so, but that doesn't mean there isn't one :P

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

            I think he wants something like Antivirus. When you save a virus infected file into the hard-disk, it jumps to the forefront immediately (almost instantly) and wipes out the file with the warning. But again, the file gets saved and then the Virus Scanner jumps in. Isn't it?

            Vasudevan Deepak Kumar Personal Homepage Tech Gossips

            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