Efficient data structure to implement fake file system

I want to implement a data structure that will hold the paths of directories, sort of fake file system. Input:- I have a text configuration file containing the paths as follows ... C:/temp1 C:/temp1/insideTemp1 C:/temp2/ ... I might end up storing huge amount of paths inside the data structure and I am looking for extremely low retrial time. Here are the data structures that I think might be useful in this situation :- B tree B+ tree Wavelet Tree Trie and B-Trie I am not sure what data structure would be best useful in this situation. I am not familiar with the B-trie, nor there are much resources on the internet that I can find that would help me in implementing and understanding one, but I think this might be a good choice for implementation considering it would have advantages of both b tree and trie, correct me if I am wrong. I would like to know what would be the good data structure in implementing this problem and if you can redirect me some resource that would help me to get started that would be great! Also, just out of curiosity, in the future if I want to expand the suggested data structure towards full-fledged file system would the suggested data structure be good enough to expand? Every answer is appreciated.

Jun 21, 2025 - 02:30
 0

I want to implement a data structure that will hold the paths of directories, sort of fake file system.

Input:- I have a text configuration file containing the paths as follows
...
C:/temp1
C:/temp1/insideTemp1
C:/temp2/
...

I might end up storing huge amount of paths inside the data structure and I am looking for extremely low retrial time.

Here are the data structures that I think might be useful in this situation :-
B tree
B+ tree
Wavelet Tree
Trie
and B-Trie

I am not sure what data structure would be best useful in this situation.

I am not familiar with the B-trie, nor there are much resources on the internet that I can find that would help me in implementing and understanding one, but I think this might be a good choice for implementation considering it would have advantages of both b tree and trie, correct me if I am wrong.

I would like to know what would be the good data structure in implementing this problem and if you can redirect me some resource that would help me to get started that would be great!

Also, just out of curiosity, in the future if I want to expand the suggested data structure towards full-fledged file system would the suggested data structure be good enough to expand?

Every answer is appreciated.