Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
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.

28 lines
789 B

  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var path = require("path");
  4. /**
  5. * Returns «true» if the last partial of the path starting with a period.
  6. */
  7. function isDotDirectory(filepath) {
  8. return path.basename(filepath).startsWith('.');
  9. }
  10. exports.isDotDirectory = isDotDirectory;
  11. /**
  12. * Convert a windows-like path to a unix-style path.
  13. */
  14. function normalize(filepath) {
  15. return filepath.replace(/\\/g, '/');
  16. }
  17. exports.normalize = normalize;
  18. /**
  19. * Returns normalized absolute path of provided filepath.
  20. */
  21. function makeAbsolute(cwd, filepath) {
  22. if (path.isAbsolute(filepath)) {
  23. return normalize(filepath);
  24. }
  25. var fullpath = path.resolve(cwd, filepath);
  26. return normalize(fullpath);
  27. }
  28. exports.makeAbsolute = makeAbsolute;