On Apr 24, 2007, at 6:00 PM, Guyren Howe wrote:

> On Apr 24, 2007, at 4:53 PM, Charles Yeomans wrote:
>
>>> I'm still trying to sort out exactly when it happens, but
>>> folderItem.delete often does nothing.
>>>
>>> I think it's whenever I've had a stream open on the file, even if I
>>> close the stream and set the stream variable to nil, I can't delete
>>> the file.
>>>
>>> This is 2K7r2 on Intel OS X 10.4.9.
>>>
>>> Anyone know a solution?
>>
>> I don't know what the problem is yet -- try this in a shell.
>>
>> lsof | grep FileName
>>
>> where FileName is the name of the file.  This will tell you whether
>> the file is still open.  If so, you may have found the problem.
>> Otherwise, you might check the file permissions, as well as the
>> LastErrorCode property of the FolderItem.
>
> The lsof thing was a good idea to try, but found nothing. Data
> points: lsof does not show the file as open; lasterrorcode = 0 after
> the delete operation; file.Exists is true both before and after the
> delete operation.
>
> Any more thoughts?


I was unable to reproduce it.  Did you check in the Finder to see  
whether it thought the file had been deleted?  I've found that  
FolderItem objects do not always update themselves reliably.

Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to