Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
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.

index.js 347B

1234567891011121314151617181920212223
  1. 'use strict';
  2. const fs = require('fs');
  3. const {promisify} = require('util');
  4. const pAccess = promisify(fs.access);
  5. module.exports = async path => {
  6. try {
  7. await pAccess(path);
  8. return true;
  9. } catch (_) {
  10. return false;
  11. }
  12. };
  13. module.exports.sync = path => {
  14. try {
  15. fs.accessSync(path);
  16. return true;
  17. } catch (_) {
  18. return false;
  19. }
  20. };