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

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您可以依赖 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)