how to copy file use eclipse API [message #278582] |
Tue, 04 January 2005 22:23  |
Eclipse User |
|
|
|
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 #278658 is a reply to message #278582] |
Wed, 05 January 2005 12:44   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.07547 seconds