Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362750

Summary: [TCF][File System] Add a "force" option to remove a file or a directory.
Product: [Tools] TCF Reporter: William Chen <william.chen>
Component: CoreAssignee: Project Inbox <tcf.core-inbox>
Status: RESOLVED FIXED QA Contact: Eugene Tarassov <eugene>
Severity: minor    
Priority: P3 CC: cdtdoug, eugene, uwe.st, william.chen
Version: unspecified   
Target Milestone: 1.0.0   
Hardware: All   
OS: All   
Whiteboard:

Description William Chen CLA 2011-11-02 23:10:45 EDT
Build Identifier: 

In the current file system service (IFileSystem), the method to remove a file, i.e., remove, and the method to remove a directory, i.e., rmdir, do not provide the ability to forcibly removing the file or folder. Please add a third parameter to allow forcibly removing a file or folder. The following signatures are suggested:
IToken remove(String file_name, boolean force, DoneRemove done);
 IToken rmdir(String path, boolean force, DoneRemove done);

Reproducible: Always
Comment 1 Eugene Tarassov CLA 2011-11-03 13:16:01 EDT
What would be the meaning of "force" parameter?
In POSIX, neither rmdir() nor remove() have such parameter.
Comment 2 William Chen CLA 2011-11-04 01:25:11 EDT
The "force" means the same as that of the shell command "rm".
-bash-3.2$ rm --help
Usage: rm [OPTION]... FILE...
Remove (unlink) the FILE(s).

...
  -f, --force           ignore nonexistent files, never prompt
Comment 3 Eugene Tarassov CLA 2011-11-04 11:37:44 EDT
-f is client side option. It controls UI behavior. It does not make any sense in the agent.
Comment 4 William Chen CLA 2011-12-12 01:15:42 EST
Resolved using a client-side resolution.