Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » copy file by programming
copy file by programming [message #528966] Thu, 22 April 2010 14:03 Go to next message
Yu Sun is currently offline Yu SunFriend
Messages: 58
Registered: July 2009
Member
Hi everyone,

I want to make a copy of a file in the project folder by programming (e.g., in my plugin, I want to select a file and run a popup menu option, which triggers an action - making a copy of the file first and then do some modifications). I need to know how to copy a file in Java so that I can write it in the ActionHandler.

Is there an API or sample code to do this?

Thanks a lot.

Yu
Re: copy file by programming [message #529005 is a reply to message #528966] Thu, 22 April 2010 15:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kai.edinger.drexler-software.de

Am 22.04.2010 16:03, schrieb Yu Sun:
> Hi everyone,
>
> I want to make a copy of a file in the project folder by programming
> (e.g., in my plugin, I want to select a file and run a popup menu
> option, which triggers an action - making a copy of the file first and
> then do some modifications). I need to know how to copy a file in Java
> so that I can write it in the ActionHandler.
> Is there an API or sample code to do this?
The Eclipse-Platform provide an API called EFS (Eclipse File System). In
pure Java, open a FileInputStream and "stream" it to a FileOutputStream.

Greetz
Kai
icon9.gif  Re: copy file by programming [message #529129 is a reply to message #528966] Fri, 23 April 2010 07:00 Go to previous message
Eclipse UserFriend
Please do not post your question into several newsgroup. People do not want to answer the same question multiple times.

See:
http://www.eclipse.org/forums/index.php?t=msg&th=166856& amp;start=0&

Thanks
andreas
Previous Topic:SWTBot JRuby console
Next Topic:Launch Actions do not appear in custom navigator
Goto Forum:
  


Current Time: Thu Apr 25 17:08:47 GMT 2024

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

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

Back to the top