Deleting IFile instance [message #38186] |
Mon, 07 August 2006 12:13 |
Eclipse User |
|
|
|
Originally posted by: nagel.trium.de
Hi all,
In my RCP application I want to delete an IFile instance by calling its
delete() method. If the file was changed (in an editor) before, I always
get a ResourceException and the file is not deleted. Is it possible to
force the deletion?
Thanks in advance,
Lars
|
|
|
Re: Deleting IFile instance [message #38222 is a reply to message #38186] |
Mon, 07 August 2006 12:48 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Lars,
Ask general questions like this on the platform newsgroup. I know that
delete fails if the file in the workspace is out of sync with the file
system, so maybe you just need to refresh it. (See
IResource.isSynchronized/refreshLocal.) Is your editor saving using the
workspace API or is it saving directly to the file system? The later
would cause a problem like this.
Lars Nagel wrote:
> Hi all,
>
> In my RCP application I want to delete an IFile instance by calling
> its delete() method. If the file was changed (in an editor) before, I
> always get a ResourceException and the file is not deleted. Is it
> possible to force the deletion?
>
> Thanks in advance,
> Lars
>
|
|
|
Re: Deleting IFile instance [message #38252 is a reply to message #38222] |
Mon, 07 August 2006 13:50 |
Eclipse User |
|
|
|
Originally posted by: nagel.trium.de
Ed Merks wrote:
> Lars,
> Ask general questions like this on the platform newsgroup. I know that
Okay, thanks.
> delete fails if the file in the workspace is out of sync with the file
> system, so maybe you just need to refresh it. (See
It is in sync, and I also set the FORCE flag.
> IResource.isSynchronized/refreshLocal.) Is your editor saving using the
> workspace API or is it saving directly to the file system? The later
> would cause a problem like this.
I use AbstractTextEditor.doSave(null).
> Lars Nagel wrote:
>> Hi all,
>>
>> In my RCP application I want to delete an IFile instance by calling
>> its delete() method. If the file was changed (in an editor) before, I
>> always get a ResourceException and the file is not deleted. Is it
>> possible to force the deletion?
>>
>> Thanks in advance,
>> Lars
>>
|
|
|
Powered by
FUDForum. Page generated in 0.01477 seconds