Is there a way to save a "." file using NSSavePanel without MacOS warning me?
I'm working on a cocoa project. My project uses a preferences menu, and includes the option to save a set of preferences as a "." file (hidden files like .rvmrc or .vimrc). The problem is that after bringing up the NSSavePanel 开发者_运维技巧and clicking Save the system pops up and reminds me that "." is reserved for the system, which isn't very cool.
Is there some way to prevent the OS from firing that prompt?
Thanks!
You can subclass or make a category of NSSavePanel and override
-[NSSavePanel _legalNameCheck:]
AFAIK, checking for the dot name is all that routine does.
精彩评论