Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Linked Resource Problem
Linked Resource Problem [message #307021] Fri, 11 August 2006 13:12 Go to next message
Eclipse UserFriend
Originally posted by: optimator.cox.net

Ok, so I have a Project that is itself linked. Within the project is a
configuration folder which has a configuration file.

When I find that configuration file resource, the Path is wrong.

Ex:
AProject - (Linked)
- src
- config
- Config.txt

IFile theFile = aProject.getFile("Config.txt");
String path = theFile.getFullPath().toString();

The path is "/AProject/Config.txt"

Should I be finding the resource a differen way? Is this a bug?

Any information would be greatly appreciated.

Thanks,
Mike
Re: Linked Resource Problem [message #307195 is a reply to message #307021] Tue, 15 August 2006 13:29 Go to previous message
Eclipse UserFriend
Originally posted by: john.eclipsefaq.org

Although I don't know what you mean by a linked project, I suspect you
are looking for the file system location of the file, obtained via
IResource.getLocationURI(). The getFullPath() method just returns the
logical path of that resource within the workspace, i.e.,
"/ProjectName/FolderName/FileName", regardless of where the project,
folder, and file are stored on disk.
--

Michael Favrot wrote:
> Ok, so I have a Project that is itself linked. Within the project is a
> configuration folder which has a configuration file.
>
> When I find that configuration file resource, the Path is wrong.
>
> Ex:
> AProject - (Linked)
> - src
> - config
> - Config.txt
>
> IFile theFile = aProject.getFile("Config.txt");
> String path = theFile.getFullPath().toString();
>
> The path is "/AProject/Config.txt"
>
> Should I be finding the resource a differen way? Is this a bug?
>
> Any information would be greatly appreciated.
>
> Thanks,
> Mike
Previous Topic:ICompositeOperation
Next Topic:How General Are Natures ?
Goto Forum:
  


Current Time: Tue Jun 17 13:38:16 EDT 2025

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

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

Back to the top