platform.getSaveFileName
The 'getSaveFileName' function displays the common 'Save File' dialog box, whereby end-users can browse the file system and select a target file.
getSaveFileName函数用来显示保存文件对话框
Prototype: platform.getSaveFileName({
- sTitle: '',
- sInitDir: '',
- sFilter: 'All files (*.*)',
});
Parameters: an object containing,
- sTitle: the dialog box title;
对话框标题 - sInitDir: an initial directory;
初始目录 - sFilter: file type filters; 文件类型
- sTitle: the dialog box title;
Return Value: String, the selected filename is returned, or 'undefined' if Cancel button pressed;
- Example:
var sFn=platform.getSaveFileName({sTitle: 'Select text file', sFilter: 'Text files(*.txt);;all files(*.*)'});