IFile delete method - Not working. [message #453044] |
Wed, 30 March 2005 06:23 |
Eclipse User |
|
|
|
Originally posted by: anunay.ashish.wipro.com
Dear All,
I am tring to use Eclipse Jobs API.
I my SWT appication I have embedded the following snippet.
WorkspaceJob job = new WorkspaceJob("Demo for Jobs API"){
public IStatus runInWorkspace(IProgressMonitor monitor) throws
CoreException {
monitor.beginTask("Monitor", 100);
IWorkspaceRoot myWorkspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
IProject myWebProject =
myWorkspaceRoot.getProject("com.nyse.mks.iis.casemanager.bluesheets2.ui ");
IFile iFile = myWebProject.getFile("test\\BlueSheetData.txt");
iFile.delete(true, false, monitor);
//iFile.setContents(iFile.getContents(), false, true, monitor);
return Status.OK_STATUS;
}
};
job.setUser(true);
job.schedule();
Inspite that the file is existing(iFile.getName() is returning the
required file name), I am not able to delete the file.
What can be the problem?
Thanks in advance.
Regards,
Ashish A.
|
|
|
Re: IFile delete method - Not working. [message #453155 is a reply to message #453044] |
Wed, 30 March 2005 19:20 |
John Arthorne Messages: 176 Registered: July 2009 |
Senior Member |
|
|
This should be asked in the eclipse.platform newsgroup. IFile and Job
are unrelated to SWT.
--
Ashnay wrote:
> Dear All,
> I am tring to use Eclipse Jobs API.
> I my SWT appication I have embedded the following snippet.
>
> WorkspaceJob job = new WorkspaceJob("Demo for Jobs API"){
> public IStatus runInWorkspace(IProgressMonitor monitor) throws
> CoreException {
> monitor.beginTask("Monitor", 100);
> IWorkspaceRoot myWorkspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
> IProject myWebProject =
> myWorkspaceRoot.getProject("com.nyse.mks.iis.casemanager.bluesheets2.ui ");
> IFile iFile = myWebProject.getFile("test\\BlueSheetData.txt");
> iFile.delete(true, false, monitor);
> //iFile.setContents(iFile.getContents(), false, true, monitor);
> return Status.OK_STATUS;
> }
> };
> job.setUser(true);
> job.schedule();
>
> Inspite that the file is existing(iFile.getName() is returning the
> required file name), I am not able to delete the file.
> What can be the problem?
>
> Thanks in advance.
>
> Regards,
> Ashish A.
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03605 seconds