aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes IFile in eclipse CDT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "IFile in eclipse CDT" Watch "IFile in eclipse CDT" New topic

IFile in eclipse CDT

vin Hari
Ranch Hand

Joined: Nov 16, 2006
Posts: 161
Dear Experts,

i encountered some thing very strange problem today ,

actually i had

final IFile file = newProject.getFile(new Path("abc.txt"));
this will get created on runtime with some message instead i am trying to copy the contents of b.txt to a.txt

so initially it was

so when the file a.txt gets created it creates with "This is the initial file contents" this message

instead of this i want the contents to be from b.txt so i did

final IFile file = newProject.getFile(new Path("abc.txt"));

as it is failing at OutputStream out = new FileOutputStream(file.tostring());

i think the outstream takes absolute value , but how to achieve this. please inform
Christophe Verré

Joined: Nov 24, 2005
Posts: 14687

What about using the full path then ?

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: IFile in eclipse CDT
Similar Threads
Copying files.
copying contents of one file to another
send files over the socket
files are not beened deleted and renamed
Download files with resume support