获取文件系统限制 [英] Get FileSystem Restrictions

查看:158
本文介绍了获取文件系统限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编写一个函数,告诉我是否可以将文件/文件夹写入特定路径。我想这样做,实际上没有写任何文件到磁盘。有没有WINAPI功能呢?
感谢您的帮助。

I would like to code a function that tells me if it's possible to WRITE a file/folder to a specific path or not. I would like to do that WITHOUT actually writing any file(s) to the disk. Is there a WINAPI function for that? Thank you for your help.

推荐答案

您可以使用 GetFileSecurity() AccessCheck()功能。阅读Aaron Ballman关于如何检查访问权限的文章。他提供了 CanAccessFolder()函数来做你所要求的。

You can use GetFileSecurity() and AccessCheck() functions. Read the Aaron Ballman's article on How to Check Access Rights. He provided the CanAccessFolder() function to do what you asked.

这篇关于获取文件系统限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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