| Summary: | [TCF][File System] Add a method to move a file or folder. | ||
|---|---|---|---|
| Product: | [Tools] TCF | Reporter: | William Chen <william.chen> |
| Component: | Core | Assignee: | Project Inbox <tcf.core-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | Eugene Tarassov <eugene> |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | cdtdoug, eugene, uwe.st, william.chen |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
William Chen
The function to expose is IMO "int rename(const char *oldpath, const char *newpath)". So I suggest that we add a "rename" function to the file system service interface, instead of "move". Given that we probably like to implement some parameters to "rename", in example to implement a behavior like "mv -f", a third argument to "rename", like "params" or similar, should be considered. Eugene: If we want to add a method to the file system service, we do have to provide a IFileSystemV1 interface, is this correct? There are probably one or two other methods to discuss if adding a new version of the file system interface. Hi Eugene & Uwe, I did see a method named "rename" in the interface IFileSystem. Its signature reads: IToken rename(String old_path, String new_path, DoneRename done); If this is the method to do both move and rename, then this bug should be invalid and closed. Hi Uwe & Eugene, Just now I tried to use rename to move a file and it worked! It seems that this method "rename" is the same method to move a file/folder besides renaming. Eugene, can you confirm that this method is meant to do both renaming and moving? If that is the case, then I need to close this bug as a invalid one. -William William, "rename" is the one to use. I should have checked the IFileSystem interface myself too. The unix "mv" utility is using the "rename" C API. For details on the C side, please check the Unix man page "rename (2)" on your Linux box :). |