2021年2月25日

Windows 文件夹 只读

摘要: How are you determining your folders are Read-only? It's not a status indicator, it's a switch. What error messages are you receiving? Keith A. Miller 阅读全文

posted @ 2021-02-25 16:16 liujx2019 阅读(149) 评论(0) 推荐(0) 编辑

免费的 Markdown 编辑器

摘要: 当作 md 文件的阅读器非常好用。 https://www.typora.io/ 阅读全文

posted @ 2021-02-25 15:52 liujx2019 阅读(116) 评论(0) 推荐(0) 编辑

Windows API 可能会返回 MSDN 文档上没有提到的错误码

摘要: 例如 _sopen_s 在磁盘空间不够的时候, 宏 errno 就会返回 ENOSPC(28) MSDN 文档时只提到以下错误码 errno valueCondition EACCES The given path is a directory, or the file is read-only, 阅读全文

posted @ 2021-02-25 15:50 liujx2019 阅读(100) 评论(0) 推荐(0) 编辑

FindNextFileA 判断文件夹是否为空,要考虑 . 和 ..

摘要: 使用文件夹地址加上通配符 * 可以搜索文件夹下的文件和文件夹 会搜出两个不是文件的文件 <DIR> . <DIR> .. 所以要至少有三个子文件(夹)才能说这个文件夹不是空的。 阅读全文

posted @ 2021-02-25 09:44 liujx2019 阅读(140) 评论(0) 推荐(0) 编辑

QDir::count 可能消耗过多内存,咋一看像内存泄漏

摘要: 用 QDir::count 获取文件夹的文件数很方便。 但在文件夹里有数百万个文件的时候,执行一次 QDir::count 就可能花费上 GB 的内存。 uint QDir::count() const { const QDirPrivate* d = d_ptr.constData(); d->i 阅读全文

posted @ 2021-02-25 09:25 liujx2019 阅读(210) 评论(0) 推荐(0) 编辑

导航