Shop OBEX P1 Docs P2 Docs Learn Events
PropDOS to get pseudo directories / Need input — Parallax Forums

PropDOS to get pseudo directories / Need input

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2008-06-13 23:59 in Propeller 1
I'm working on a new concept in PropDOS, pseudo directories.

Since FSRW is a ways from supporting folders, I'm putting together an update to PropDOS
which will help with the huge mess of files on my SD card. Anyone else here?

Here's what I've got in mind..

Addition of the following commands..

MKDIR <folder> -- This will create a hidden .DIR text file that will be empty.
COPY filename <folder> -- This will place an entry in the hidden .DIR text file, (maybe prevent it from display at the root.)
DEL filename -- Will continue to remove the physical file, also remove it from hidden .DIR texts.
CD <folder> -- will open the proper text file for DIR to list it's contents.

This will be a temporary measure until greater minds than mine can add true folder support in FSRW.

Gmail users could think of this as a type of Gmail "Labels" instead of folders.. [noparse]:)[/noparse]

Comments? Suggestions?

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
Need a part? Got spare electronics? - The Electronics Exchange

Comments

  • stevenmess2004stevenmess2004 Posts: 1,102
    edited 2008-06-13 07:11
    Sounds good. Only problem is that you couldn't have files with the same name in any of the folders. So, maybe the COPY should be a MOVE. Other problem would be doing a DIR on the root directory. You may also want to include an option to list all the files in the real root and another option to just list the files that don't appear in the DIR file.

    If you do something with this I'll fix up PropBash to work with the changes.

    Post Edited (stevenmess2004) : 6/13/2008 7:19:01 AM GMT
  • vampyrevampyre Posts: 146
    edited 2008-06-13 13:19
    Thats not a bad idea, i love the simplicity. you could add file sizes to the .DIR file as well. as far as listing the directory of the root directory, why not just have a root.dir file? Im looking forward to seeing what you do with this
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-13 13:45
    It's actually becoming a "LABEL" command, and the DIR command will show
    the DIR.file if it is selected. The CD and CD .. command moves you in and out of the file.

    I'm redirecting F1 and DIR to display the virtual directory, while F4 and DIR/W
    will show the actual root.

    I'll leave it up to the users if you want to select a virtual directory as your root.

    It should be ready in a day or so.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • rokickirokicki Posts: 1,000
    edited 2008-06-13 17:57
    Hmm, I hate to see effort on this to just work around a limitation in fsrw.

    Surely adding directory support to fsrw shouldn't be *that* hard. I won't have time to do it, probably, for a long time, but
    I could perhaps help a little bit in answering questions and/or guiding the solution.

    I mean, fsrw *already* reads one directory; reading other directories is truly not that different, and adding code to
    manage the current working directory, add path searching, etc. shouldn't be hard.

    If you forgo mkdir/rmdir in the initial cut that makes it even easier (people can always mkdir/rmdir on another
    computer if they want).
  • kuronekokuroneko Posts: 3,623
    edited 2008-06-13 23:07
    rokicki said...
    Hmm, I hate to see effort on this to just work around a limitation in fsrw.

    Exactly my thoughts. I'm playing with the idea of actually implementing directory support ... I did it before (complete VFAT FS in VP asm), so it can't be that hard [noparse];)[/noparse]
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-13 23:59
    Well if the Titans of Code among us step forward and do it, I'll implement it.

    In the meantime, I'm adding a "LABEL" command which will allow easy sorting of files,
    and CD to view them. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
Sign In or Register to comment.