gt0t+@ANDREW.CMU.EDU (Gregory Ross Thompson) (09/07/89)
Well, I spent about a half hour yesterday examining how AppleWorks manages to save files as "File Number 1" instead of "FILE.NUMBER.1". It does not, I repeat DOES NOT put spaces in the file name life someone mentioned earlier on this bboard. Here's how it works: When AW reads the directory, it reads all the directory info (all programs do this). When it comes across an AW file, it looks at the Aux_Type field, and uses that to determine which letters are caps/lower or period/space. It will not do it on any other file type. Here's how it stores the info. Each character in the file name has a flag (one bit). If the flag is off (0) then the character is upper case, or a period as the case may be. If the flag is on (1) then the character is lower case, or a space (if it's a period). Since there is a max of 15 characters in the filename, this means it'll take almost 2 full bytes for the info (1 bit is not used). The Aux_Type field just happens to be two bytes, so they stick it in there. So if the file name was "My New AW File", then the Aux_Type would be (in binary..) 0110111001011100 The last bit is unused. The Aux_Type in Hex would be 6E 5C (I did that in my head, it may be wrong). Understand? So it doesn't do ANYTHING to the actual name of the file, it just has a flag for each character to see if it's caps or not. neat, huh? So if all you programmers wanted to be REALLY neat-o in your latest program, have it check that on all AW files... -Greg T. P.S. I still need the # for CMS...
dlyons@Apple.COM (David Lyons) (09/08/89)
In article <QZ1Kx=a00WB9RaiFsI@andrew.cmu.edu> gt0t+@ANDREW.CMU.EDU (Gregory Ross Thompson) writes: > Well, I spent about a half hour yesterday examining how AppleWorks manages >to save files as "File Number 1" instead of "FILE.NUMBER.1". It does not, I >repeat DOES NOT put spaces in the file name life someone mentioned earlier on >this bboard. Here's how it works: [...uses the auxiliary type to record which characters are lowercase, treating " " as a lowercase period...] Yup, you got it. Note that this information is available in Apple II File Type Notes $19, $1A, and $1B. -- --Dave Lyons, Apple Computer, Inc. | DAL Systems AppleLink--Apple Edition: DAVE.LYONS | P.O. Box 875 AppleLink--Personal Edition: Dave Lyons | Cupertino, CA 95015-0875 GEnie: D.LYONS2 or DAVE.LYONS CompuServe: 72177,3233 Internet/BITNET: dlyons@apple.com UUCP: ...!ames!apple!dlyons My opinions are my own, not Apple's.