Skip navigation.
 
mlRe: FSCopyObjectASync callback handler
FROM : Mike Abdullah
DATE : Sun Aug 06 22:10:09 2006

Well here's my test class:

#import "Controller.h"

@implementation Controller

static void statusCallback(FSFileOperationRef fileOp, const FSRef 
*currentItem, FSFileOperationStage stage, OSStatus error, 
CFDictionaryRef statusDictionary, void *info)
{
   printf("statusCallback called");
}

- (IBAction)doCopy:(id)sender
{
   OSStatus err;
   FSRef  sourceFileRef, destinationDirectoryRef;
   
   // Build the parameters
   FSFileOperationRef fileOp = FSFileOperationCreate(kCFAllocatorDefault);
   
   FSPathMakeRef((UInt8 *)[@"/Users/dev/Desktop/" 
fileSystemRepresentation], &sourceFileRef, NULL);
   
   FSPathMakeRef((UInt8 *)[@"/Users/dev/" fileSystemRepresentation], 
&destinationDirectoryRef, NULL);
   
   OptionBits options = kFSFileOperationDefaultOptions;
   
   // Do the copy
   err = FSCopyObjectAsync(fileOp,
                           &sourceFileRef,
                           &destinationDirectoryRef,
                           (CFStringRef)@"Desktop 2",
                           options,
                           statusCallback,
                           1.0,
                           NULL);
}

@end

I click a button in my interface which calls the IBAction method. 
Everything seems to work just fine, and the folder (about 2 gigs) is 
copied.  However, the callback is never actually called.  Any ideas?

Mike.

On 6 Aug 2006, at 16:42, John Stiles wrote:

> Even if you put a printf at the very top of your callback, nothing 
> gets printed?
> If that's the case, you should probably post a code snippet.

Related mailsAuthorDate
mlFSCopyObjectASync callback handler Mike Abdullah Aug 6, 01:36
mlRe: FSCopyObjectASync callback handler Jordan Krushen Aug 6, 03:39
mlRe: FSCopyObjectASync callback handler Mike Abdullah Aug 6, 10:45
mlRe: FSCopyObjectASync callback handler John Stiles Aug 6, 17:42
mlRe: Re: FSCopyObjectASync callback handler Michael Ash Aug 6, 19:31
mlRe: FSCopyObjectASync callback handler Mike Abdullah Aug 6, 22:10
mlRe: Re: FSCopyObjectASync callback handler Michael Ash Aug 6, 22:46
mlRe: FSCopyObjectASync callback handler Rosyna Aug 6, 23:35
mlRe: FSCopyObjectASync callback handler Mike Abdullah Aug 7, 13:22