• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Modify Data Fork
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modify Data Fork


  • Subject: Re: Modify Data Fork
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 19 Nov 2001 16:42:06 -0800

On Thursday, November 15, 2001, at 11:51 AM, Markus Schutt wrote:

Does somebody know , how to delete the first 50(e.g.)
Bytes from the Data Fork without copying the whole
file.

The short answer is it can't be done, and it's not an AppleScript problem. (It might be possible to *say* this efficiently, but the implementation would still have to rewrite the entire file.) You'd have to have direct support from the file system in order to do this, and no OS I've ever heard of does.

That said, it's possible to cheat in some cases. If the file format has some sort of "filler" character you can put in, then you can overwrite those 50 unwanted characters instead, or perhaps slide a little stuff around.

For example, say you've got a mostly-normal EPSF file, but it's got 50 bytes of junk at the front before the %!PS. You could find where the normal header comments end (they're only a few lines long, as I recall), copy them up to the front, and then write an extra comment to fill in the now-dead space. Presto!


--Chris Nebel
AppleScript Engineering


References: 
 >Modify Data Fork (From: Markus Schutt <email@hidden>)

  • Prev by Date: Re: Counting Multiple files??
  • Next by Date: Referencing a Folder Relatively
  • Previous by thread: Re: Modify Data Fork
  • Next by thread: FMP custom menu via AppleScript still not resolved...
  • Index(es):
    • Date
    • Thread