platform.getOpenFileNames

The 'getOpenFileNames' function displays the common 'Open File' dialog box, whereby end-users can browse the file system and select multiple files.
getOpenFileNames函数用来显示打开文件对话框,用户可以浏览文件系统和选择多个文件

  • Prototype: platform.getOpenFileNames({

    • sTitle: '',
    • sInitDir: '',
    • sFilter: 'All files (*.*)'

    });

  • Parameters: an object containing,

    1. sTitle: the dialog box title;
      对话框标题
    2. sInitDir: an initial directory;
      初始文件夹
    3. sFilter: file type filters;
      文件类型
  • Return Value: an Array containing selected files, or an empty Array on Cancel;

  • Example:
    var vFiles=platform.getOpenFileNames({sTitle: 'Select text files', sFilter: 'Text files(*.txt);;all files(*.*)'});