Proper way to programmatically copy files inside of eclipse [message #762771] |
Thu, 08 December 2011 10:50  |
Eclipse User |
|
|
|
I am trying to programmatically copy files from a location on the file
system to an project location. This works fine in the development
environment, but when I deploy this as an RCP the file copy fails. The copy
code using javaIO to copy the files and the following (new LocalFile(new
File(source)).copy(new LocalFile(new File(destination)), EFS.NONE,
monitor);), both of which fail in an RCP application , but work in my
development environment.
What is the proper way to copy files programmatically in eclipse?
|
|
|
Re: Proper way to programmatically copy files inside of eclipse [message #763324 is a reply to message #762771] |
Fri, 09 December 2011 10:10  |
Eclipse User |
|
|
|
Strange the problem was that IResource.getRawLocation() was returning null
in the deployed RCP applications, but was working fine in the development
env. A call to IResource.getLocation() seemed to fix the issue, not sure why
getRawLocation() was failing.
"Drew" <drew@acm.org> wrote in message news:jbqmb8$7i9$1@news.eclipse.org...
> I am trying to programmatically copy files from a location on the file
> system to an project location. This works fine in the development
> environment, but when I deploy this as an RCP the file copy fails. The
> copy code using javaIO to copy the files and the following (new
> LocalFile(new File(source)).copy(new LocalFile(new File(destination)),
> EFS.NONE, monitor);), both of which fail in an RCP application , but work
> in my development environment.
>
> What is the proper way to copy files programmatically in eclipse?
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05335 seconds