Re: Can't copy files...
Re: Can't copy files...
- Subject: Re: Can't copy files...
- From: Ondra Cada <email@hidden>
- Date: Wed, 12 Dec 2001 21:46:28 +0100
Riccardo,
>
>>>>> Riccardo Santato (RS) wrote at Wed, 12 Dec 2001 21:09:18 +0100:
RS> I'm toying 'round with NSFileManager class and I'm stuck into copying
RS> files. I'm trying to copy some files I chose from an NSBrowser (let's
RS> call it "source_browser") to another one (called "dest_browser").
RS> Here's the incriminated code:
RS>
RS> [fm copyPath:[source_browser path] toPath:[dest_browser path]
RS> handler:nil];
RS>
RS> "fm" is a filemanager that it's allocated via the selector
RS> "defaultManager" when the NIB awakes. The program doesn't give me any
RS> error, NSFileManager doesn't need delegates, and the above function
RS> returns me a TRUE boolean (checked with an if/else conditional block).
RS> Can you give me a little hand, please ? :-))
It should work. Have you tried to check whether you aren't copying somwthing
different than you meant to? Like
NSString *from=[source_browser path],*to=[dest_browser path];
BOOL ret;
NSLog(@"Copying (%@) to (%@) using %@",from,to,fm);
ret=[fm copyPath:from toPath:to handler:nil]
NSLog(@"Result %d",ret);
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc