IFile in an IProject??? [message #289785] |
Wed, 10 August 2005 18:50 |
Eclipse User |
|
|
|
Originally posted by: no_email_please.hotmail.com
Ok, I've been looking at this for a while and I'm going crazy.
How do I add an IFile to an IProject? Is that the way it's
supposed to be? Or am I missing another step in between?
I've got both objects already. I just need to know how they
plug together...
Thanks
Nic
|
|
|
Re: IFile in an IProject??? [message #289791 is a reply to message #289785] |
Wed, 10 August 2005 19:09 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
You want to create a new file within your project?
In that case:
IFile file = project.getFile(new Path("/dir1/file1.ext"));
if (!file.exists()) {
InputStream in = (an input stream that will return the
contents of what you want to be in the new file);
file.create(in, true, progressmonitor);
}
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.03306 seconds