Page 1 of 1

A thought I had...

Posted: Sat Dec 27, 2008 8:16 am
by tkmk
This is a little thing I thought of that *might* help...

Code: Select all

struct file{
  int exists;//boolean
  int isUsed;//To prevent deletion of critical parts and to avoid conflict
  int name;
  int location;//name is probably unnecessary with location...
};
struct folder{
  contents[];//not so sure of using an array for this
  int name;
  int exists;
  int isUsed;
  int location;//If it is a sub folder
  int isSubFolder;//Boolean
};
Hope this helps :D


P.S. i am a noob, so tell me if it has errors

Re: A thought I had...

Posted: Sat Dec 27, 2008 8:20 am
by Love4Boobies
Not trying to offend you by any means but... why did you post this?

Re: A thought I had...

Posted: Sat Dec 27, 2008 8:22 am
by tkmk
No particular reason. Just to see if this basic concept is correct. :)

Re: A thought I had...

Posted: Sat Dec 27, 2008 8:26 am
by Love4Boobies
Well this is basically how you would describe a filesystem based on your own observation of it, I guess. I suggest taking a look at JamesM's VFS (Virtual File System) tutorial. Enjoy! :wink:

Re: A thought I had...

Posted: Sat Dec 27, 2008 8:29 am
by tkmk
Thanks! I was thinking of adding type to the file structure, but I think its unnecessary

Re: A thought I had...

Posted: Sun Dec 28, 2008 2:14 pm
by Troy Martin
Adding a type descriptor isn't unnecessary, it's what MacOS did. They were normally 3 or 4 character strings to determine the type.

Also, that's a nifty idea, I should try converting it to NASM! :D