NoFS.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.NoFS = void 0;
  4. const FakeFS_1 = require("./FakeFS");
  5. const path_1 = require("./path");
  6. const makeError = () => Object.assign(new Error(`ENOSYS: unsupported filesystem access`), { code: `ENOSYS` });
  7. class NoFS extends FakeFS_1.FakeFS {
  8. constructor() {
  9. super(path_1.ppath);
  10. }
  11. getExtractHint() {
  12. throw makeError();
  13. }
  14. getRealPath() {
  15. throw makeError();
  16. }
  17. resolve() {
  18. throw makeError();
  19. }
  20. async openPromise() {
  21. throw makeError();
  22. }
  23. openSync() {
  24. throw makeError();
  25. }
  26. async opendirPromise() {
  27. throw makeError();
  28. }
  29. opendirSync() {
  30. throw makeError();
  31. }
  32. async readPromise() {
  33. throw makeError();
  34. }
  35. readSync() {
  36. throw makeError();
  37. }
  38. async writePromise() {
  39. throw makeError();
  40. }
  41. writeSync() {
  42. throw makeError();
  43. }
  44. async closePromise() {
  45. throw makeError();
  46. }
  47. closeSync() {
  48. throw makeError();
  49. }
  50. createWriteStream() {
  51. throw makeError();
  52. }
  53. createReadStream() {
  54. throw makeError();
  55. }
  56. async realpathPromise() {
  57. throw makeError();
  58. }
  59. realpathSync() {
  60. throw makeError();
  61. }
  62. async readdirPromise() {
  63. throw makeError();
  64. }
  65. readdirSync() {
  66. throw makeError();
  67. }
  68. async existsPromise(p) {
  69. throw makeError();
  70. }
  71. existsSync(p) {
  72. throw makeError();
  73. }
  74. async accessPromise() {
  75. throw makeError();
  76. }
  77. accessSync() {
  78. throw makeError();
  79. }
  80. async statPromise() {
  81. throw makeError();
  82. }
  83. statSync() {
  84. throw makeError();
  85. }
  86. async fstatPromise(fd) {
  87. throw makeError();
  88. }
  89. fstatSync(fd) {
  90. throw makeError();
  91. }
  92. async lstatPromise(p) {
  93. throw makeError();
  94. }
  95. lstatSync(p) {
  96. throw makeError();
  97. }
  98. async fchmodPromise() {
  99. throw makeError();
  100. }
  101. fchmodSync() {
  102. throw makeError();
  103. }
  104. async chmodPromise() {
  105. throw makeError();
  106. }
  107. chmodSync() {
  108. throw makeError();
  109. }
  110. async fchownPromise() {
  111. throw makeError();
  112. }
  113. fchownSync() {
  114. throw makeError();
  115. }
  116. async chownPromise() {
  117. throw makeError();
  118. }
  119. chownSync() {
  120. throw makeError();
  121. }
  122. async mkdirPromise() {
  123. throw makeError();
  124. }
  125. mkdirSync() {
  126. throw makeError();
  127. }
  128. async rmdirPromise() {
  129. throw makeError();
  130. }
  131. rmdirSync() {
  132. throw makeError();
  133. }
  134. async linkPromise() {
  135. throw makeError();
  136. }
  137. linkSync() {
  138. throw makeError();
  139. }
  140. async symlinkPromise() {
  141. throw makeError();
  142. }
  143. symlinkSync() {
  144. throw makeError();
  145. }
  146. async renamePromise() {
  147. throw makeError();
  148. }
  149. renameSync() {
  150. throw makeError();
  151. }
  152. async copyFilePromise() {
  153. throw makeError();
  154. }
  155. copyFileSync() {
  156. throw makeError();
  157. }
  158. async appendFilePromise() {
  159. throw makeError();
  160. }
  161. appendFileSync() {
  162. throw makeError();
  163. }
  164. async writeFilePromise() {
  165. throw makeError();
  166. }
  167. writeFileSync() {
  168. throw makeError();
  169. }
  170. async unlinkPromise() {
  171. throw makeError();
  172. }
  173. unlinkSync() {
  174. throw makeError();
  175. }
  176. async utimesPromise() {
  177. throw makeError();
  178. }
  179. utimesSync() {
  180. throw makeError();
  181. }
  182. async readFilePromise() {
  183. throw makeError();
  184. }
  185. readFileSync() {
  186. throw makeError();
  187. }
  188. async readlinkPromise() {
  189. throw makeError();
  190. }
  191. readlinkSync() {
  192. throw makeError();
  193. }
  194. async truncatePromise() {
  195. throw makeError();
  196. }
  197. truncateSync() {
  198. throw makeError();
  199. }
  200. async ftruncatePromise(fd, len) {
  201. throw makeError();
  202. }
  203. ftruncateSync(fd, len) {
  204. throw makeError();
  205. }
  206. watch() {
  207. throw makeError();
  208. }
  209. watchFile() {
  210. throw makeError();
  211. }
  212. unwatchFile() {
  213. throw makeError();
  214. }
  215. }
  216. NoFS.instance = new NoFS();
  217. exports.NoFS = NoFS;