如何停止打开文件 [英] How to stop file from opening

查看:100
本文介绍了如何停止打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

预先感谢
我想停止打开文件(文本文件),这意味着用户无法打开文件.

Thanks in advance
I want to stop a File(text File) from opening, means user cannot open the file. Is it possible ?

推荐答案

不完全,不是.
如果用户具有管理员权限,那么他可能可以打开任何内容.

您最好选择加密文件内容.
Not completely, no.
If the user has admin privileges then he can probably open anything.

You would be better off encrypting the file content instead.


格里夫(Griff)基本上是正确的,但是为什么要这样做呢?如果仅在应用程序运行时需要执行此操作,则可以打开文件以进行独占访问(这是默认模式),并保持打开状态.

—SA
Griff is basically right, but why doing it? If you need to do it just during the runtime of your application, you can open the file for exclusive access (this is the default mode) and keep it open.

—SA


这篇关于如何停止打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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