FsaNodeStats.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.FsaNodeStats = void 0;
  4. const time = 0;
  5. const timex = typeof BigInt === 'function' ? BigInt(time) : time;
  6. const date = new Date(time);
  7. class FsaNodeStats {
  8. constructor(isBigInt, size, kind) {
  9. this.kind = kind;
  10. const dummy = (isBigInt ? timex : time);
  11. this.uid = dummy;
  12. this.gid = dummy;
  13. this.rdev = dummy;
  14. this.blksize = dummy;
  15. this.ino = dummy;
  16. this.size = size;
  17. this.blocks = dummy;
  18. this.atime = date;
  19. this.mtime = date;
  20. this.ctime = date;
  21. this.birthtime = date;
  22. this.atimeMs = dummy;
  23. this.mtimeMs = dummy;
  24. this.ctimeMs = dummy;
  25. this.birthtimeMs = dummy;
  26. this.dev = dummy;
  27. this.mode = dummy;
  28. this.nlink = dummy;
  29. }
  30. isDirectory() {
  31. return this.kind === 'directory';
  32. }
  33. isFile() {
  34. return this.kind === 'file';
  35. }
  36. isBlockDevice() {
  37. return false;
  38. }
  39. isCharacterDevice() {
  40. return false;
  41. }
  42. isSymbolicLink() {
  43. return false;
  44. }
  45. isFIFO() {
  46. return false;
  47. }
  48. isSocket() {
  49. return false;
  50. }
  51. }
  52. exports.FsaNodeStats = FsaNodeStats;
  53. //# sourceMappingURL=FsaNodeStats.js.map