Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Resource API and StateLocation
Resource API and StateLocation [message #438065] Wed, 12 October 2005 19:25 Go to next message
Eclipse UserFriend
Originally posted by: bdberry.us.ibm.com

Hi,

I am creating a folder in the state location however I am unable to get
a handle to that folder as an IFolder. Is there a different API I am
supposed to use here? This is a code snippet...folder.exists() always
returns false even when the directories are created using the
java.io.File method mkdirs().

IPath path = null;
IFolder folder = null;

path = MyPlugin.getDefault().getStateLocation()
path = path.append("one").append("two");
path.toFile().mkdirs();
folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
System.out.println("folder exists: " + folder.exists());
Re: Resource API and StateLocation [message #438066 is a reply to message #438065] Thu, 13 October 2005 03:49 Go to previous message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 362
Registered: July 2009
Senior Member
The state location is a private place your plug-in to keep its data. The
workspace is where user projects, files and folders are kept. For
creating files/directories in the state location, you are limited to
using java.io.File.

Rafael

Brian Berry wrote:
> Hi,
>
> I am creating a folder in the state location however I am unable to get
> a handle to that folder as an IFolder. Is there a different API I am
> supposed to use here? This is a code snippet...folder.exists() always
> returns false even when the directories are created using the
> java.io.File method mkdirs().
>
> IPath path = null;
> IFolder folder = null;
>
> path = MyPlugin.getDefault().getStateLocation()
> path = path.append("one").append("two");
> path.toFile().mkdirs();
> folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
> System.out.println("folder exists: " + folder.exists());
>
Previous Topic:RCP WebStart Jar Sign problem.
Next Topic:Want ShowView menu in Window's menu
Goto Forum:
  


Current Time: Thu Dec 05 16:35:16 GMT 2024

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

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

Back to the top