简体   繁体   English

使用Java在sqlite中存储目录树

[英]Store directory tree in sqlite with java

What is the best way to store a direcory tree (with file/subdirs names) on sqlite database? 在sqlite数据库上存储目录树(带有文件/子目录名称)的最佳方法是什么? (any java example code would be appreciated) (任何Java示例代码将不胜感激)

If you want to just store and retrieve the entire directory tree listing, you could save it as an XML file. 如果只想存储和检索整个目录树列表,则可以将其另存为XML文件。 If you want to make the tree structure visible to sqlite so you can select or change pieces of it (eg, count the number of files), that's a bit more complicated. 如果您想使树结构对sqlite可见,以便您可以选择或更改其中的部分(例如,计算文件数),则要复杂一些。 See my earlier post here , and especially the article that it links to. 在这里查看我的早期文章 ,尤其是它链接到的文章。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM