Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362750 - [TCF][File System] Add a "force" option to remove a file or a directory.
Summary: [TCF][File System] Add a "force" option to remove a file or a directory.
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: 1.0.0   Edit
Assignee: Project Inbox CLA
QA Contact: Eugene Tarassov CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-02 23:10 EDT by William Chen CLA
Modified: 2013-06-05 05:42 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.