获取文件系统限制

编程入门 行业动态 更新时间:2024-10-24 06:34:34
本文介绍了获取文件系统限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想编写一个函数,告诉我是否可以将文件/文件夹写入特定路径。我想这样做,实际上没有写任何文件到磁盘。有没有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.

更多推荐

获取文件系统限制

本文发布于:2023-10-31 18:43:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1546950.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件系统

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!