Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » IFile in an IProject???
IFile in an IProject??? [message #289785] Wed, 10 August 2005 18:50 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:IFile device
Next Topic:Smart stepping in debugger?
Goto Forum:
  


Current Time: Sat Apr 27 01:56:45 GMT 2024

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

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

Back to the top