| Problem to delete file in workspace using the resource API [message #330820] | 
Thu, 14 August 2008 04:46  | 
 
Eclipse User  | 
 | 
 | 
   | 
 
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)); 
			}
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.03766 seconds