节点:OS / X上的文件对话框过滤器

时间:2019-06-27 10:50:51

标签: node.js linux macos visual-studio-code vscode-extensions

此VS Code扩展程序中的代码过滤Windows上*.css格式的文件。

vscode.window.showOpenDialog({
    canSelectFiles: true,
    canSelectMany: false,
    defaultUri: vscode.Uri.file(fs.existsSync(currentPath) ? currentPath : styleCachePath),
    filters: {
        Stylesheet: ['css']
    }
}).then(f => { ... });

我是否需要在OS / X或Linux上进行任何特殊处理,以确保仅显示或选择CSS样式表(或任何其他特定类型)?

我无法通过实验来确定这一点,因为我所有的开发计算机都运行Windows。

0 个答案:

没有答案