Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » accesing file outside of a project's scope
accesing file outside of a project's scope [message #282674] Thu, 17 March 2005 14:35
Inocencio Richiez is currently offline Inocencio RichiezFriend
Messages: 9
Registered: July 2009
Junior Member
this code:
private void visitZipFile() throws CoreException {
IWorkspaceRoot workspaceRoot =
ResourcesPlugin.getWorkspace().getRoot(); IPath zipFilePath =
project.getWorkingLocation(WebPlugin.getUniqueIdentifiers()) ;

IPath apath = new Path(zipFilePath+File.separator+"websrc.zip");
IFile file = workspaceRoot.getFile(apath);

if(workspaceRoot.exists(zipFilePath))
System.out.println("THIS PATH EXIST!");
else
System.out.println("THIS PATH DOES NOT EXIST!");

IFile file = workspaceRoot.getFile(apath);
......
throws a - org.eclipse.core.runtime.CoreException: File not accessible:
.....
The message - THIS PATH DOES NOT EXIST! is also displayed.
I dynamically placed the file in this location (zipFilePath) before
executing this code and it works. I then need to go to this location
latter on in the excution to retrive this file like I do in "file" above.
But as I said the code throws this CoreException.
Any help will be greatly appreciated.... thanks
Previous Topic:linking a model with a view and an editor
Next Topic:Problems occurred when invoking code from plug-in: "org.eclipse.jface".
Goto Forum:
  


Current Time: Thu Oct 17 01:21:52 GMT 2024

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

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

Back to the top