From: Nikolaus R. <Nik...@ra...> - 2011-03-21 14:28:12
|
Ravi Krishnan <msr...@pu...> writes: > Hi Goswin, Stef and Nikolaus, > > Thanks for your replies. > > But by this you mean we can use the opendir() and readdir() UNIX functions > to access the directories as given in examples and need not take care of our > own path translation using metadata table which we had planned to > implement?? Sorry, I don't understand what you mean by this. > It is just not clear to me as to how to implement my MYFUSE_readdir() > method. I have seen the examples in fuse but they use the UNIX system class > opendir() and readdir() and fill the buffer with the* directory entries from > the DIRENT pointer* which gives information on the I-node. > > I want to fill the buffer and make the path lookup from my metadata table > which will have fields as follows(in the sense I will want to take my > directory entry values from my metadata table which I will build), > > 1) Directory bit - to indicate whether the entry is a directory or a file > 2) File Name > 3) File Number - which will be unique to each file > 4) And many other things like access time, modification time, etc........ > > Please can any one suggest how could I achieve this?? Is there any resource > which you could point me to?? Well, just fill the buffer any way you like. No one forces you do use opendir() and readdir(), you can e.g. get the data from your metadata table instead. -Nikolaus -- »Time flies like an arrow, fruit flies like a Banana.« PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C |