deleting files in the folder [message #326444] |
Wed, 19 March 2008 23:46 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.03012 seconds