版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 rivejä
360 B

  1. const fs = require('fs')
  2. const paths = ['C:/libjpeg-turbo']
  3. if (process.arch === 'x64') {
  4. paths.unshift('C:/libjpeg-turbo64')
  5. }
  6. paths.forEach(function (path) {
  7. if (exists(path)) {
  8. process.stdout.write(path)
  9. process.exit()
  10. }
  11. })
  12. function exists (path) {
  13. try {
  14. return fs.lstatSync(path).isDirectory()
  15. } catch (e) {
  16. return false
  17. }
  18. }