Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Copying file from *absolute* path
Copying file from *absolute* path [message #262763] Tue, 20 July 2004 22:36 Go to next message
Kazuya Mori is currently offline Kazuya MoriFriend
Messages: 3
Registered: July 2009
Junior Member
I want copy from a file into a directory of my project.
How can I do it? I checked API to get IFile object from
the workspace and found the followings:


But this does not suite to what I want because this "path"
must be relative to the workspace.

My "path" points an absolute (from OS filesystem) file.
Re: Copying file from *absolute* path [message #262876 is a reply to message #262763] Wed, 21 July 2004 13:41 Go to previous message
Eclipse UserFriend
Originally posted by:

If you want to copy into your workspace, you use the standard
FileInputStream on your file that you want to copy from (in your file
system), and then use the IFile.setContents() to the file in the
workspace that you want to copy into. Note, this will make a copy, so
timestamps on the new IFile will not be the same as the timestamps from
the file in your system.

Thanks, Rich Kulp

Previous Topic:How to write a listener to the saving action of other editor
Next Topic:how to set source on multipage editor
Goto Forum:

Current Time: Wed Jun 20 11:53:24 GMT 2018

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

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

Back to the top