惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
Google DeepMind News
Google DeepMind News
Apple Machine Learning Research
Apple Machine Learning Research
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
爱范儿
爱范儿
L
LangChain Blog
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
Hugging Face - Blog
Hugging Face - Blog
G
Google Developers Blog
T
Tailwind CSS Blog
Engineering at Meta
Engineering at Meta
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 太阳底下淋雨

amd显卡的问题 防止WindowChrome控件遮挡下面的控件 win11右键子菜单展开增加延时 [转]Git清除贡献者信息和历史提交记录,将开源项目拉取二次开发时可用到 快速查询python项目使用了哪些第三方库 C#删除路径到回收站 C#操作超长路径文件时异常的处理 win11使用传统右键菜单 WPF中自定义按钮实现最大化最小化动画过度效果 Excel文件中嵌入自定义功能区customUI.xml文件后,如何进行修改 Excel中得到合并单元格的信息 WPF中文字发虚的问题解决 文件没有读取权限造成的File.Exists结果为false js如何判断当前页面是否处于激活状态 WinForm使用发布方式进行安装的安装目录 SqlServer使用row_number()分页 EF强类型查询本身部分字段时的处理 Dapper实现Like参数化 winform恢复窗口前端显示
判断是否为隐藏文件
太阳底下淋雨 · 2024-04-28 · via 博客园 - 太阳底下淋雨

判断是否为隐藏文件

代码

FileAttributes attributes = File.GetAttributes(filePath);
//var FileInfo = new FileInfo(filePath);
//var attributes = FileInfo.Attributes;
var IsHidden = (attributes & FileAttributes.Hidden) == FileAttributes.Hidden;
//文件夹一样的方法
//var DirInfo = new DirectoryInfo(dirPath);
//var IsHidden = (DirInfo.Attributes & FileAttributes.Hidden) == FileAttributes.Hidden;

posted @ 2024-04-28 17:02  太阳底下淋雨  阅读(43)  评论(0)    收藏  举报