replies will have an uniq id... Each post will have a file for it's replies.
There is a conflict there. If replies have uniq IDs, then their bodies will exist in the hierarchy, so what will you store in the "file of replies"?
My suggestion would be to store symlinks to the replies in the directory holding the body of the parent. That way, you do not have to traverse the hierarchy from the root to find them (as you would if you store a file containing the reply IDs).
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
i didn't really understand , what i mean is :
user dir:us/er/user2/
posts file:us/er/user2/posts.txt
replies folder:us/er/user2/replies/
replies for post 12us/er/user2/replies/12.txt
(txt extention is only for example)
inside a post file posts stored as :
id1|time|post_content\n
id2|time|post_content\n
id3|time|post_content\n
if i want to read the last few post's , i will use a read backwards module, or something similar.
the replies files have the same structure as post file only with name of the user replied.
id1|time|user|reply_content\n
id2|time|user|reply_content\n
id3|time|user|reply_content\n
I just wanted to know what is better , to store it like this or to make a file for each reply/post ?
| [reply] [d/l] [select] |