此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。