Created
September 27, 2012 15:40
-
-
Save pjrobertson/3794702 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+// Contents of sourceFiles are SBObjects (i.e. it's technically an SBElementArray) | |
+ NSMutableArray *sourceFiles = [[NSMutableArray alloc] initWithCapacity:[files count]]; | |
+ for (NSString *path in files) { | |
+ [sourceFiles addObject:[[finder items] objectAtLocation:path]]; | |
+ } | |
+ FinderItem *destinationItem = [[finder items] objectAtLocation:destination]; | |
+ | |
+ if (copy) { | |
+ [(SBObject *)sourceFiles duplicateTo:destinationItem replacing:NO routingSuppressed:NO exactCopy:YES]; | |
+ } else { | |
+ [(SBObject *)sourceFiles moveTo:destinationItem positionedAt:nil routingSuppressed:NO]; | |
+ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment