Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » copy file by programming
copy file by programming [message #528969] Thu, 22 April 2010 14:04 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 the ActionHandler.

Is there an API or sample code to do this?

Thanks a lot.

Yu
Re: copy file by programming [message #528973 is a reply to message #528969] Thu, 22 April 2010 14:13 Go to previous messageGo to next message
Jan Reimann is currently offline Jan ReimannFriend
Messages: 140
Registered: July 2009
Senior Member
Hi Yu,
have a look at the IFile API:
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/reference/api/org/eclipse/core/resources/IFile.html

best regards,
Jan


> 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 the ActionHandler.
> Is there an API or sample code to do this?
>
> Thanks a lot.
>
> Yu
Re: copy file by programming [message #528981 is a reply to message #528973] Thu, 22 April 2010 14:30 Go to previous message
Yu Sun is currently offline Yu SunFriend
Messages: 58
Registered: July 2009
Member
Great. Thanks Jan.
Re: copy file by programming [message #605659 is a reply to message #528973] Thu, 22 April 2010 14:30 Go to previous message
Yu Sun is currently offline Yu SunFriend
Messages: 58
Registered: July 2009
Member
Great. Thanks Jan.
Previous Topic:launching JUnit plugin-test from command Prompt
Next Topic:F12 and F10 Keys won't work when using SWT components in PDE
Goto Forum:
  


Current Time: Fri Apr 19 23:25:38 GMT 2024

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

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

Back to the top