• 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
Re: Can't copy files...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't copy files...


  • Subject: Re: Can't copy files...
  • From: Ondra Cada <email@hidden>
  • Date: Thu, 13 Dec 2001 18:30:24 +0100

Riccardo,

>>>>>> Riccardo Santato (RS) wrote at Thu, 13 Dec 2001 13:28:40 +0100:
RS> after having implemented Ondra's suggestion for copying files, here it is
RS> what PB return me out:
RS>
RS> XFiles[407] Copying (/Users/riccardo/Desktop/dira/poof.sit) to (/Users/
RS> riccardo/Desktop/dirb) using <NSFileManager: 0x879c0>
RS> XFiles[407] Result 0

Well, so you know the file operation was not successful (returned NO).

RS> XFiles.app has exited with status 0
RS>
RS> Well, i'ts quite obvious that the name for the app is "XFiles" (temporary
RS> name). Less obvious is the fact that the selector doesn't return me any
RS> error and the app DOESN'T quit by itself. I start supposing the problem
RS> is the "handler" argument in the selector (I gave "nil") . I don't fully
RS> understand why should I give a nil pointer for a file operation...

"nil pointer" should be rather read "no object", and it is exactly that
case: you can (but need not) supply a handler, which would be informed how
the file operation goes. If you don't want to supply it, you are (properly)
using nil.

RS> What's going on ?

Most probably for some reason or another you cannot copy
"/Users/riccardo/Desktop/dira/poof.sit" to "/Users/riccardo/Desktop/dirb".
Just from the names I guess you actually wanted to copy
"/Users/riccardo/Desktop/dira/poof.sit" into
"/Users/riccardo/Desktop/dirb/poof.sit"; if that's the case, you cannot copy
it there since "dirb" already exists and is a directory, and you wanted to
make it a file (with the same contents as the poof archive has).

You just forgot that _programmer's_ API is not (and I personally think it's
right) as rich in guessing your intentions as the _user's_ interface of "cp"
is ;)
---
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


  • Follow-Ups:
    • Updated Copy...
      • From: Riccardo Santato <email@hidden>
    • Re: Can't copy files...
      • From: Riccardo Santato <email@hidden>
References: 
 >Re: Can't copy files... (From: Ondra Cada <email@hidden>)
 >Re: Can't copy files... (From: Riccardo Santato <email@hidden>)

  • Prev by Date: Re: GhettoWeb
  • Next by Date: Re: buy that new Book?
  • Previous by thread: Re: Can't copy files...
  • Next by thread: Re: Can't copy files...
  • Index(es):
    • Date
    • Thread