Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Proper way to programmatically copy files inside of eclipse
Proper way to programmatically copy files inside of eclipse [message #762771] Thu, 08 December 2011 15:50 Go to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
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 15:10 Go to previous message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
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?
>
>
>
Previous Topic:Actions are disabled if editor loses focus. Why?
Next Topic:Removing EObject from EMF Resource with RemoveCommand
Goto Forum:
  


Current Time: Thu Apr 18 11:43:41 GMT 2024

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

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

Back to the top