Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Problem to delete file in workspace using the resource API
Problem to delete file in workspace using the resource API [message #330820] Thu, 14 August 2008 08:46
mikael petterson is currently offline mikael pettersonFriend
Messages: 73
Registered: July 2009
Member
Hi,

We are developing a plugin for Eclipse 3.3.x.

I manage to create a temporary directory in the workspace. I move the
content to the temporary directory. Then a make a new directory and move
the content to
the new directory. Then I make a refreshLocal(). The last step is to
remove the
temporary folder. I make a delete but it does not work. Any ideas why?

cheers,

//mikael


// Now move back the content of tmp to original.
// To avoid CoreException do a refreshLocal(). Does
// not recognize the cc created resource directory.
resource.refreshLocal(IResource.DEPTH_ZERO, null);
IResource[] tmpResources = tmpFolder.members();
for (int i = 0; i < tmpResources.length; i++) {
IPath renamedPath = folder.getFullPath()
.append(tmpResources[i].getName());
tmpResources[i].move(renamedPath, true, new SubProgressMonitor(
monitor, 10));
}

// Remove the temporary.
if (tmpFolder.exists()) {
tmpFolder.delete(true,true, new SubProgressMonitor(
monitor, 10));
}
Previous Topic:Out of Memory
Next Topic:sorting table
Goto Forum:
  


Current Time: Wed Jul 17 01:28:34 GMT 2024

Powered by FUDForum. Page generated in 0.02796 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top