Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] IFile problem

public IFile fileToIFile() {
	 	File f = new File("F:/eclipse/workspace/abc/cct.c");
	 	String p = f.getAbsolutePath();
		IPath path = new Path(p);
	            IFile iFile =
ResourcesPlugin.getWorkspace().getRoot().getFile(path);
	    
	    try {
			iFile.getContents();
		} catch (CoreException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	    return iFile;
	  }

I am trying to get the IFile using the above way but every time i get the
exception iFile does not exist.

Where iFile is actually supposed to be located. Please help.


Sunil Virmani


Disclaimer: 

This message and any attachment(s) contained here are information that is
confidential,proprietary to HCL Technologies and its customers, privileged
or otherwise protected by law.The information is solely intended for the
individual or the entity it is addressed to. If you are not the intended
recipient of this message, you are not authorized to read, forward,
print,retain, copy or disseminate this message or any part of it. If you
have received this e-mail in error, please notify the sender immediately by
return e-mail and delete it from your computer.




Back to the top