Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » deleting files in the folder
deleting files in the folder [message #326444] Wed, 19 March 2008 23:46 Go to next message
Eclipse UserFriend
Originally posted by: ponraj_007.yahoo.com

Hi All,
In my application i written the code like this,

IFolder folder = project.getFolder("app");
IResource resources[] = folder.members();

int length1 = resources.length;
for (int i = 0; i < length1; i++) {
{
resources[i].delete(true, null);
}

int length1 = folder.members().length;

In this code i am deleting all the resources in a particular folder.
after that i am checking the members length for that folder. I am
expecting that length should be 0.

If i run this code i am getting the same number for length1 and length2.
But in the workspace my folder(app) is empty.

I don't know why this is happening.


Thanks for your help.


Ponraj
Re: deleting files in the folder [message #326463 is a reply to message #326444] Thu, 20 March 2008 09:32 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Ponraj,

Maybe it's zero in both cases?


Ponraj wrote:
> Hi All,
> In my application i written the code like this,
>
> IFolder folder = project.getFolder("app");
> IResource resources[] = folder.members();
>
> int length1 = resources.length;
> for (int i = 0; i < length1; i++) {
> {
> resources[i].delete(true, null); }
>
> int length1 = folder.members().length;
>
> In this code i am deleting all the resources in a particular folder.
> after that i am checking the members length for that folder. I am
> expecting that length should be 0.
>
> If i run this code i am getting the same number for length1 and length2.
> But in the workspace my folder(app) is empty.
>
> I don't know why this is happening.
>
>
> Thanks for your help.
>
>
> Ponraj
>
Previous Topic:Custom marker icon does not display in Problems view
Next Topic:[Databinding] Is it possible to create a Detail IObservableList based off an IObservableList?
Goto Forum:
  


Current Time: Sun Sep 15 11:15:17 GMT 2024

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

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

Back to the top