• 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
File copying not copying...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

File copying not copying...


  • Subject: File copying not copying...
  • From: deekpyro <email@hidden>
  • Date: Fri, 12 Apr 2002 22:37:53 -0500

In the declaration below I tell the app when it closes to copy a file over
depending on if theCheckBoxWBC is check or not (state), it compiles and runs
fin but doesn't copy the file over...hum...any thoughts?


- (NSApplicationTerminateReply)applicationShouldTerminate:(id)sender
{
if([theCheckBoxWBC state]) {
[[NSFileManager defaultManager] copyPath:@"/Applications/Moo X
Folder/Files/com.apple.windowserver.plist"
toPath:@"/Library/Preferences/com.apple.windowserver.plist" handler:nil];
} else {
[[NSFileManager defaultManager] copyPath:@"/Applications/Moo X
Folder/Backups/com.apple.windowserver.plist"
toPath:@"/Library/Preferences/com.apple.windowserver.plist" handler:nil];
}

return NSTerminateNow;
}

I would also like to know how to create an error message if these files
can't be found so if anyone knows how to do that that would be great.

Thanks, Derek
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: File copying not copying...
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: How to do "mkdir -p"?
  • Next by Date: Re: ever felt like a complete BONZO??
  • Previous by thread: Re: How to do "mkdir -p"?
  • Next by thread: Re: File copying not copying...
  • Index(es):
    • Date
    • Thread