accesing file outside of a project's scope [message #282674] |
Thu, 17 March 2005 09:35 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.05120 seconds