Shop OBEX P1 Docs P2 Docs Learn Events
Rename a file with FSRW? — Parallax Forums

Rename a file with FSRW?

JonnyMacJonnyMac Posts: 9,208
edited 2010-05-04 20:03 in Propeller 1
I'm tired so I may be looking right past the obvious... but is there a way to rename a file with FSRW?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-04 15:48
    I don't think so. I know the original FSRW 2.4 didn't have a rename operation and I don't think that was added in FSRW 2.6
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-05-04 15:54
    Thanks, Mike; I guess I'll just delete said file.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • Dave HeinDave Hein Posts: 6,347
    edited 2010-05-04 16:41
    The directory is just a specially formatted file, so you could write your own rename method.· I might get around to doing that tonight after work.· Hopefully, FSRW will allow me to write to the directory.· I am developing a standard C-function interface to FSRW for CLib, and I wrote a readdir method to provide the information I needed for directory listings.· Take a look at the attached fsrwif.spin file.· Wikipedia has a good description of the directory structure under "File Allocation Table".

    Dave
  • rokickirokicki Posts: 1,000
    edited 2010-05-04 17:00
    No, fsrw supports neither directory "write" nor rename. Rename is not too hard but you *do* need to avoid duplicate names, delete a
    file that is renamed-over (or error-out if you decide on those semantics), and said deletion must of course free the cluster chain.

    FSRW was never intended to be a full POSIX filesystem; that's more Kye's ambition than mine.
  • KyeKye Posts: 2,200
    edited 2010-05-04 20:03
    I have two more weeks of finals (I'll be done on Tuesday next week) After that I'll be working on the FATEngine soon and releasing it with all wanted features.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
Sign In or Register to comment.