|
Re: copy file by programming [message #529005 is a reply to message #528966] |
Thu, 22 April 2010 15:05 |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.02872 seconds