Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » how to copy file use eclipse API
how to copy file use eclipse API [message #278582] Tue, 04 January 2005 22:23 Go to next message
Eclipse UserFriend
Originally posted by: nay0648.163.com

Hello!

there are some file outside eclipse workspace path,in my plugin,I want to
copy them into my project,I know in IWorkspace there is a copy method can
do this,it need IResource as its argument,but I don't know how to use
IResource to reference file I want to copy,please help me,thanks.
Re: how to copy file use eclipse API [message #278601 is a reply to message #278582] Wed, 05 January 2005 08:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: akiezun.mit.remove.edu

nay0648 wrote:
> Hello!
>
> there are some file outside eclipse workspace path,in my plugin,I want
> to copy them into my project,I know in IWorkspace there is a copy method
> can do this,it need IResource as its argument,but I don't know how to
> use IResource to reference file I want to copy,please help me,thanks.

the operation class is called Import..something

hth
/adam
Re: how to copy file use eclipse API [message #278658 is a reply to message #278582] Wed, 05 January 2005 12:44 Go to previous messageGo to next message
Eclipse UserFriend
On Wed, 5 Jan 2005 03:23:16 +0000 (UTC), nay0648 <nay0648@163.com> wrote:

> Hello!
>
> there are some file outside eclipse workspace path,in my plugin,I want
> to copy them into my project,I know in IWorkspace there is a copy method
> can do this,it need IResource as its argument,but I don't know how to
> use IResource to reference file I want to copy,please help me,thanks.
>

I just use java.nio.* ( cause I have 30 MB to copy ) to copy the files
to their destination and then call
destFolder.refreshLocal( IResource.DEPTH_INFINITE, null )
where destFolder is the IFolder that is the destination of the copied
files.

-- Regards, d
Re: how to copy file use eclipse API [message #278663 is a reply to message #278601] Wed, 05 January 2005 14:44 Go to previous message
Eclipse UserFriend
Adam Kiezun wrote:
> nay0648 wrote:
>
>> Hello!
>>
>> there are some file outside eclipse workspace path,in my plugin,I want
>> to copy them into my project,I know in IWorkspace there is a copy
>> method can do this,it need IResource as its argument,but I don't know
>> how to use IResource to reference file I want to copy,please help
>> me,thanks.
>
>
> the operation class is called Import..something
>

i was wrong:
org.eclipse.ui.actions.CopyFilesAndFoldersOperation
see method copyFiles
Previous Topic:using JNI to access shared object file
Next Topic:Which interfaces to implemet for my Preferences Scope ?
Goto Forum:
  


Current Time: Wed Jul 16 16:47:47 EDT 2025

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

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

Back to the top