Re: NSFileManager buggy?!?
Re: NSFileManager buggy?!?
- Subject: Re: NSFileManager buggy?!?
- From: Chris Parker <email@hidden>
- Date: Mon, 14 Jan 2002 15:29:14 -0800
Hi Ondra,
On Monday, January 14, 2002, at 02:54 PM, Ondra Cada wrote:
my tool copies a number of files using the NSFileManager's
"copyPath:toPath:handler:". For diverse reason I call the method for
each
file myself, so my "handler" is always nil.
Now, sometimes, quite randomly -- so far I haven't been able to catch
any
regularity there -- the "copyPath:toPath:handler:" returns YES, but the
result file has zero size (checked both by "ls -l" and programmatically
by
"...attributesAtPath:...fileSize").
I haven't run into this problem with any of my test cases - if there
were any pattern at all to what files are copying (or not, in this case)
in this manner, that would be a great help.
Some of the files I copy are pretty big (movies, up to 90 MB), but that
should not be a problem -- anyway, on the target disk there still is
almost
GB free. That seems to be irrelevant though: even if there is *not*
place
enough, the method should return NO if the file was not copied
successfully?
This is correct - the method -should- return NO if the file was not
copied successfully. For extremely large files (multiple GB)
copyPath:toPath:handler: will fail (this is a known issue that's being
worked on), but it doesn't sound like you're running into that.
Is that a known bug, or has anybody some bright idea what the problem
might
be? Might it be caused by the lamentable fact that HFS+ is used?
Is this a straight HFS+ -> HFS+ copy or are other filesystems involved
(SMB, UFS, NFS)?
.chris
--
Chris Parker <email@hidden>
Cocoa Frameworks Engineer