Or simply copy it "manually" by using two BinaryStreams, like...

  define kBlockSize = 1000000 // 1 MB

  dim strm1, strm2 as BinaryStream

  strm1 = file1.OpenAsBinaryFile(false)
  strm2 = file2.CreateBinaryFile("audio/x-mp3")
  // Caution: add error checking!
  do until strm1.EOF
    block = strm1.Read(kBlockSize)
    strm2.Write block
  loop

That would be platform-independent (although not as fast as a native OS file copy, I suppose).

Cheers,
   Frank+++

Am 06.02.2007 um 18:27 schrieb Norman Palardy:


On Feb 06, 2007, at 7:21 AM, Arnaud Nicolet wrote:

Hello,

I've made an application that copies files to an mp3 disk.
Since the disk is formatted as FAT32 and I can't reformat it as HFS (it does not understand that format), I have to avoid copying resource fork (if any) and metadata, so I'm using the shell command "cp file1 file2".

Under Mac OS 10.3, there is no problem: only the data fork is being copied.

The problem is with Mac OS 10.4. Using that OS, the metadata part is also copied although I'm using the exact same application with the same shell command.

By looking at the man pages of the cp command, I can't find a parameter to avoid the copy of the metadata part.

Using the Finder or CopyFileTo method also copy the metadata and resource fork (as they also did in 10.3).

Is it simply impossible to just copy a data fork using Mac OS 10.4?

Who know, maybe the last post in this list :-(

Further replies will be directed to [EMAIL PROTECTED]
To subscribe send a message to [EMAIL PROTECTED]

I believe in 10.4 Apple "fixed" this so that meta data would get copied.
You used to have to use ditto to get everything

Ditto has options to NOT copy resources and otherwise is a lot like cp

You might try that

--

Günter Schmidt GmbH
Frank Bitterlich             eMail: [EMAIL PROTECTED]
Ben-Gurion-Ring 21           WWW:   http://www.gsco.de/
D-60437 Frankfurt            Tel.:  069 / 156809-29
GERMANY                      Fax:   069 / 156809-28





_______________________________________________
Unsubscribe:
<[EMAIL PROTECTED]>

REAL Software has decided to consolidate this mailing list with the online Forums.  
On Monday, February 12, 2007, this mailing list will no longer be active.  We 
encourage you to continue your REALbasic and REAL SQL Server discussions on the 
Forums.  If you are not presently a member of the forum, please sign up today at 
<http://forums.realsoftware.com>.

Reply via email to