[Vfs-devel] Directories
Status: Alpha
Brought to you by:
eesa
From: Abdul-Wahid P. <ee...@we...> - 2000-06-08 23:49:31
|
Hi, I think that the directory interface should be kept quite conentional so that it is obvious to users how the interface works. This is probably mainly achieved by using good grahpics like folders that open and close. (Wonder where that comes from?) One thing I did mention to Adis was that we could use the mime type of the file to display a icon particular to that file type. I don't think we want thousands of different icons. I mean just one for image and not one for each of .gif, .jpg, .tif, .png etc. I would like the user to have the option to change the order that the files are listed according to size, user, date, name etc. This would be inline with directory browsing that you see on websites. Apart from that, it would be nice to be slightly innovative. The whole point of VFS is to offer extra feature than existing solutions so we might want to scratch our heads over this one (watch out for the dandruff though). ;) As for the techincal structure of the database. I had something like this in mind: CREATE TABLE directory ( int4 dir_id PRIMARY KEY, int4 parent_dir_id NOT NULL, text dir_name, text vfs_user, abstime creation_date ); The system would have one top level directory set up when the system is first setup. It would have something like dir_id = 1 and parent_dir=1. That is, the fact that dir_id == parent_dir_id shows that it is the top level. Each user would have its own top-level directory created when the user was created. That is dir_id=x and parent_dir_id = 1. We know which directory is the user's toplevel by select the directory where parent_dir_id = 1 and vfs_user='this user'. Users can then setup sub-directories within their directory. The directories would always link back through the parent_dir_id. Am I making sense so far? We would then have something like two link tables: CREATE TABLE read_dir ( int4 dir_id, text vfs_user); and similar for write. If the user had an entry for a dir_id in read_dir he would be able to see all files in that directory. Note, he would still need download permission to actually get any of the files so he might be able to see that a file exists but not have permission to download it. Similarly for the write. If he had an entry he could create directories and upload files into that directory. Probably a system administrator could create further top-level directories along side the user directories for archives that are open to everyone. What do you think? Please comment, I am just writing this down off the top off my head. See ya, AW |