生成条件唯一标识符

发布于 2024-11-01 17:41:55 字数 137 浏览 9 评论 0原文

我有一个应用程序,可以在其中读取文件夹内的所有子文件夹。我只想读取由我的应用程序创建的文件夹。因此,我想生成唯一标识符作为文件夹名称,这些标识符应该可以识别为我的应用程序创建的标识符。如果将任何其他文件夹复制到同一位置,我想通过检查它们的名称来忽略这些文件夹。

I've an application where I read all the sub-folders inside a folder. I want to read only the folders created by my application. So I want to generate unique identifiers as folder names which should be recognizable as the ones created by my applications. If any other folders are copied in the same location I want to ignore those folders by checking their names.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

°如果伤别离去 2024-11-08 17:41:55

如果您可以依赖 NTFS 文件系统,您可以使用备用数据流标记所有文件夹,检查在读取列表时是否存在这样的流...只是一个想法

//

如果您想要一些只有您的应用程序可以使用的标记, 请编辑创建....将文件/备用数据流放置在包含其路径的文件夹中,以及消息身份验证代码(例如 hmacMD5 或类似的东西)

if you can rely on the file system being NTFS you could tag all your folders with an alternate datastream check if such a stream is present while reading the list ... just an idea

//edit

if you want some tag that only your app can create .... place a file/alternate datastream in the folder containing its path, and a message authentication code (like hmacMD5 or something like that)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文