如何防止从确定的目录中复制,粘贴和删除文件 [英] How to prevent copy, paste and delete file from the determined directory

查看:90
本文介绍了如何防止从确定的目录中复制,粘贴和删除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在团队项目中完成某些任务.我做了我的第一项工作,即如何从包含寄存器文件的USB识别和获取文件.我已经研究了如何防止某些操作,例如:从USB复制,粘贴,删除不包含注册文件的文件.到目前为止,我还没有解决这个问题的想法.

I'm doing some task in my team's project. I did my first work that is how to recognize and get file from the USB which contains a register file. And I have researched how to prevent some action like: copy, paste, delete files from the USB which don't contain a register file. Until now, I don't have any idea to solve this problem.

如果我的计算机中有未经授权的USB和授权的USB.我可以从授权的USB但未经授权的USB复制,粘贴和删除文件.

If there are unauthorized USB and authorized USB in my computer. I can copy, paste, delete files from authorized USB but unauthorized USB.

我尝试使用FileSystemWatcher,但更改后我只能处理文件已更改"信息.在更改之前(完成复制,粘贴或删除之前)如何处理?

I have tried using FileSystemWatcher but I just can handle "file changed" info AFTER it's changed. How can I handler BEFORE it's changed (before it 's done copy, paste or delete) ?

我认为某些东西可以用作Prevent v1.0程序,但不能阻止所有文件,仅来自确定的目录,并且我没有Prevent v1.0的源代码

I thought something work as Prevent v1.0 program, but not prevent all the files, just from the determined directory and I don't have source code of Prevent v1.0

任何帮助都是宝贵的.

推荐答案

您需要使用文件系统过滤器驱动程序才能拒绝写入或删除.您可以编写自己的文件(完成此工作需要6-9个工作月),也可以使用我们的 CallbackFilter 产品,可让您在大约一个小时内完成任务.

You need to use a file system filter driver in order to deny writing or deletion. You can write your own (6-9 man-months of work to get it right), or you can use our CallbackFilter product, which lets you complete your task in about an hour.

请记住,操作系统没有文件复制"操作.文件复制是文件打开/文件读取/文件写入/文件关闭操作的顺序.

Remember, that the OS doesn't have "file copy" operation. File copying is a sequence of file open/file read/file write/file close operations.

这篇关于如何防止从确定的目录中复制,粘贴和删除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆