IFolder.move() gives exception on windows machine [message #516543] |
Wed, 24 February 2010 11:37 |
Ibrahim Messages: 8 Registered: February 2010 |
Junior Member |
|
|
Hi, I am trying to move a resource (IFolder) from one location to another location inside the project through IFolder.move() API as follows:
dataFolder.move(project.getLocation(), true, null);
The problem I am getting is, I am running it on the Windows platform and the first parameter IPath resolves to the file system path as: 'C:/workspace/project'. And move() gives me CoreException as : ":" is an invalid character in path.
Has anyone faced this similar issue?
[Updated on: Wed, 24 February 2010 12:31] Report message to a moderator
|
|
|
|
Re: IFolder.move() gives exception on windows machine [message #516772 is a reply to message #516550] |
Thu, 25 February 2010 06:06 |
Ibrahim Messages: 8 Registered: February 2010 |
Junior Member |
|
|
Hi, can u guide me how to get the Project relative path?
to me IProject.getProjectRelativePath() is not giving the path I expect. Its giving the path like /project/folder1 but I need /project, because here only i want to move the folder.
Also, I have one more doubt since I am new to this forum. I cannot see this posting under Eclipse Platform forum or anywhere either. It is not listed here though I posted it here. I have to go to Home>Control Panel>Show own posts to get to see this topic. Why is it so?
[Updated on: Thu, 25 February 2010 06:11] Report message to a moderator
|
|
|
Re: IFolder.move() gives exception on windows machine [message #516854 is a reply to message #516772] |
Thu, 25 February 2010 11:24 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Ibrahim,
A workspace relative path is of the form /<project-name>. You're the
one doing the moving so you need to specify where to move it in the
workspace. Note that I've been taking about getFullPath, not about
getProjectRelativePath.
Ibrahim wrote:
> Hi, can u guide me how to get the Project relative path?
> to me IProject.getProjectRelativePath() is not giving the path I
> expected.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02517 seconds