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.

getDirectory.js 900B

1234567891011121314151617181920212223242526272829303132333435363738
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.getDirectory = getDirectory;
  6. exports.getDirectorySync = getDirectorySync;
  7. var _path = _interopRequireDefault(require("path"));
  8. var _pathType = require("path-type");
  9. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  10. async function getDirectory(filepath) {
  11. const filePathIsDirectory = await (0, _pathType.isDirectory)(filepath);
  12. if (filePathIsDirectory === true) {
  13. return filepath;
  14. }
  15. const directory = _path.default.dirname(filepath);
  16. return directory;
  17. }
  18. function getDirectorySync(filepath) {
  19. const filePathIsDirectory = (0, _pathType.isDirectorySync)(filepath);
  20. if (filePathIsDirectory === true) {
  21. return filepath;
  22. }
  23. const directory = _path.default.dirname(filepath);
  24. return directory;
  25. }
  26. //# sourceMappingURL=getDirectory.js.map