delete-file

How to `rm -rf *` in TCL

北城余情 提交于 2021-01-28 02:04:54
问题 I want to delete all files in a directory using TCL. (I'm using Xilinx Vivado's TCL console under Win 10.) I found that in TCL documentation that file delete ?-force? ?- -? pathname ?pathname ... ? should work. But file delete -force -- [glob *] does nothing. What's the wrong with that? 回答1: Make that file delete -force -- {*}[glob *] ... so that the path names returned by [glob] are turned into multiple arguments to [file delete] (using the expansion operator {*} ), rather than one argument

can i restore a .git file after rm-rf?

做~自己de王妃 提交于 2021-01-16 04:03:46
问题 I needed to pull the master branch but was having issues merging it into my local master and so thought it expeditious to simply rm -rf the entire folder. This was the greatest error of my life to date because I had weeks of work in an unpushed local branch commited in my .git. Can someone please tell me there's some way of finding and restoring this?? If it makes a difference, I'm on a Windows machine. Thanks all. 回答1: Alright, so all hope is apparently lost for my git history (the .git file

Trash files inside user-selected folder inside iCloud Drive

混江龙づ霸主 提交于 2020-12-09 04:24:11
问题 My app works with user txt-files (create, change, delete) inside any user-selected folder. I just internally store the bookmark to get access to that user-selected folder and files. Now, with macOS Catalina when the source folder is inside iCloud Drive, system still allows me to create and edit files. But doesn't allow to trash one. When I try to do it via [[NSFileManager defaultManager] trashItemAtURL: ... ] I get the following error: Error Domain=NSCocoaErrorDomain Code=3328 "<filename>

Trash files inside user-selected folder inside iCloud Drive

坚强是说给别人听的谎言 提交于 2020-12-09 04:23:57
问题 My app works with user txt-files (create, change, delete) inside any user-selected folder. I just internally store the bookmark to get access to that user-selected folder and files. Now, with macOS Catalina when the source folder is inside iCloud Drive, system still allows me to create and edit files. But doesn't allow to trash one. When I try to do it via [[NSFileManager defaultManager] trashItemAtURL: ... ] I get the following error: Error Domain=NSCocoaErrorDomain Code=3328 "<filename>