Forum Moderators: coopster

Message Too Old, No Replies

Real folders or Virtual folders

File Repository

         

supermanjnk

1:49 pm on Jul 13, 2009 (gmt 0)

10+ Year Member



I am working on a program for a file repository. it is going to need to be able to have a main root folder, then an undetermined amount of sub folders in which they can store files. I'm stuck between using a real folder structure to store the files, or storing all the files in one folder and using a database with a table for folders and a table for files and using PHP to create a folder / file list

I am going to need to set permissions on the individual files / folders as there will be multiple users.

Any thoughts?

janharders

1:55 pm on Jul 13, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you could deal with the permissions with extra flat files (per folder and file). It'd have the advantage that you can just backup the directory and have "everything", browse it offline without checking permissions etc.
It might look ugly, though, and most people don't want to deal with flat files. I've used both, but with complex permissions that shouldn't / cannot be reflected on the file system (e.g. posix acls), I'd vote for the database, it makes it easier.