[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a2tools for ProDOS (?)
"John B. Matthews" <nospam@nospam.com> wrote in news:nospam-
659D00.14444829082003@clmboh1-nws3.columbus.rr.com:
> ProDOS is fine, but e.g. SYSTEM.APPLE should be 9-Nov-80. The
> rest ahould be '79 or '80. I'll dig further.
Ahh, I see what you mean. They only -look- like appropriate dates!
Obviously my date decoding is plain wrong. In
com.webcodepro.applecommander.util there is an AppleUtil class. It's
just a bunch of static utility methods. The getPascalDate and
setPascalDate should be checked... or maybe the PascalFileEntry is wrong
(24th byte is the date?).
> Sounds good. I'm looking at getopt (or similar) in java and what
> options to do. Perhaps we (you, Chris and c.s.a.p) have some
> ideas. For my own purposes (similar to Chris's) I was thinking:
>
> -l <imagename> (list image, recursive, native format)
> -g <pathname> <imagename> (get file from image)
> -p <sourcepath> <destpath> <imagename> (put file into image)
> -h (help)
Some other ideas would be to delete a file, to create a blank disk
image, or to convert a file.
My original thought was to create a pseudo-language, but that was
probably too complex.
> I'm only using storage; I don't have eclipse or swt. I stumbled
> briefly with AppleWorksWordProcessorFileFilter dragging in the
> whole ui:-) Reading & writing files _looks_ easy:-)
Actually, the GUI shouldn't be an issue - look at the FileFilter
interface. Sorry in advance for the butchered code...
public interface FileFilter {
/**
* Process the given FileEntry and return a byte array with
filtered data.
*/
public byte[] filter(FileEntry fileEntry);
/**
* Give suggested file name.
*/
public String getSuggestedFileName(FileEntry fileEntry);
}
Create the appropriate FileFilter (ie,
AppleWorksWordProcessorFileFilter) and then use the filter method to
export it. You get a byte array back - and then write it as you
normally would. I don't remember the mapping, but I could rummage
around with it.
If the GUI is connected, then I screwed up something - one of my design
decisions was to keep the Apple domain separate from anything GUI-
related.
If you can, I'd encourage you to try Eclipse. I find it really
productive. (I realize it's a "religious" area, so I'll leave it at
that.)
> John
> ----
> jmatthews at wright dot edu
> www dot wright dot edu/~john.matthews/
I'm really psyched about this!!
-Rob