@theia/filesystem 1.77.0-next.1 → 1.77.0-next.108

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (436) hide show
  1. package/lib/browser/breadcrumbs/filepath-breadcrumb.js +4 -8
  2. package/lib/browser/breadcrumbs/filepath-breadcrumb.js.map +1 -1
  3. package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.d.ts +1 -1
  4. package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.d.ts.map +1 -1
  5. package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.js +18 -25
  6. package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.js.map +1 -1
  7. package/lib/browser/breadcrumbs/filepath-breadcrumbs-contribution.d.ts +5 -5
  8. package/lib/browser/breadcrumbs/filepath-breadcrumbs-contribution.d.ts.map +1 -1
  9. package/lib/browser/breadcrumbs/filepath-breadcrumbs-contribution.js +27 -33
  10. package/lib/browser/breadcrumbs/filepath-breadcrumbs-contribution.js.map +1 -1
  11. package/lib/browser/download/file-download-command-contribution.d.ts +1 -1
  12. package/lib/browser/download/file-download-command-contribution.d.ts.map +1 -1
  13. package/lib/browser/download/file-download-command-contribution.js +28 -33
  14. package/lib/browser/download/file-download-command-contribution.js.map +1 -1
  15. package/lib/browser/download/file-download-frontend-module.js +8 -10
  16. package/lib/browser/download/file-download-frontend-module.js.map +1 -1
  17. package/lib/browser/download/file-download-service.d.ts +1 -1
  18. package/lib/browser/download/file-download-service.d.ts.map +1 -1
  19. package/lib/browser/download/file-download-service.js +19 -25
  20. package/lib/browser/download/file-download-service.js.map +1 -1
  21. package/lib/browser/file-dialog/file-dialog-container.d.ts +1 -1
  22. package/lib/browser/file-dialog/file-dialog-container.d.ts.map +1 -1
  23. package/lib/browser/file-dialog/file-dialog-container.js +25 -30
  24. package/lib/browser/file-dialog/file-dialog-container.js.map +1 -1
  25. package/lib/browser/file-dialog/file-dialog-hidden-files-renderer.d.ts +1 -1
  26. package/lib/browser/file-dialog/file-dialog-hidden-files-renderer.d.ts.map +1 -1
  27. package/lib/browser/file-dialog/file-dialog-hidden-files-renderer.js +13 -21
  28. package/lib/browser/file-dialog/file-dialog-hidden-files-renderer.js.map +1 -1
  29. package/lib/browser/file-dialog/file-dialog-model.d.ts +2 -2
  30. package/lib/browser/file-dialog/file-dialog-model.d.ts.map +1 -1
  31. package/lib/browser/file-dialog/file-dialog-model.js +20 -27
  32. package/lib/browser/file-dialog/file-dialog-model.js.map +1 -1
  33. package/lib/browser/file-dialog/file-dialog-module.js +21 -23
  34. package/lib/browser/file-dialog/file-dialog-module.js.map +1 -1
  35. package/lib/browser/file-dialog/file-dialog-service.d.ts +4 -4
  36. package/lib/browser/file-dialog/file-dialog-service.d.ts.map +1 -1
  37. package/lib/browser/file-dialog/file-dialog-service.js +29 -38
  38. package/lib/browser/file-dialog/file-dialog-service.js.map +1 -1
  39. package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.d.ts +3 -1
  40. package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.d.ts.map +1 -1
  41. package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.js +17 -22
  42. package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.js.map +1 -1
  43. package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.spec.d.ts +2 -0
  44. package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.spec.d.ts.map +1 -0
  45. package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.spec.js +35 -0
  46. package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.spec.js.map +1 -0
  47. package/lib/browser/file-dialog/file-dialog-tree.d.ts +2 -2
  48. package/lib/browser/file-dialog/file-dialog-tree.d.ts.map +1 -1
  49. package/lib/browser/file-dialog/file-dialog-tree.js +8 -11
  50. package/lib/browser/file-dialog/file-dialog-tree.js.map +1 -1
  51. package/lib/browser/file-dialog/file-dialog-widget.d.ts +2 -2
  52. package/lib/browser/file-dialog/file-dialog-widget.d.ts.map +1 -1
  53. package/lib/browser/file-dialog/file-dialog-widget.js +18 -23
  54. package/lib/browser/file-dialog/file-dialog-widget.js.map +1 -1
  55. package/lib/browser/file-dialog/file-dialog.d.ts +11 -6
  56. package/lib/browser/file-dialog/file-dialog.d.ts.map +1 -1
  57. package/lib/browser/file-dialog/file-dialog.js +109 -126
  58. package/lib/browser/file-dialog/file-dialog.js.map +1 -1
  59. package/lib/browser/file-dialog/index.d.ts +4 -4
  60. package/lib/browser/file-dialog/index.d.ts.map +1 -1
  61. package/lib/browser/file-dialog/index.js +4 -7
  62. package/lib/browser/file-dialog/index.js.map +1 -1
  63. package/lib/browser/file-resource.d.ts +2 -2
  64. package/lib/browser/file-resource.d.ts.map +1 -1
  65. package/lib/browser/file-resource.js +64 -71
  66. package/lib/browser/file-resource.js.map +1 -1
  67. package/lib/browser/file-resource.spec.js +39 -41
  68. package/lib/browser/file-resource.spec.js.map +1 -1
  69. package/lib/browser/file-selection.d.ts +1 -1
  70. package/lib/browser/file-selection.d.ts.map +1 -1
  71. package/lib/browser/file-selection.js +7 -10
  72. package/lib/browser/file-selection.js.map +1 -1
  73. package/lib/browser/file-service-activation.spec.d.ts +2 -0
  74. package/lib/browser/file-service-activation.spec.d.ts.map +1 -0
  75. package/lib/browser/file-service-activation.spec.js +79 -0
  76. package/lib/browser/file-service-activation.spec.js.map +1 -0
  77. package/lib/browser/file-service-copy.spec.d.ts +2 -0
  78. package/lib/browser/file-service-copy.spec.d.ts.map +1 -0
  79. package/lib/browser/file-service-copy.spec.js +193 -0
  80. package/lib/browser/file-service-copy.spec.js.map +1 -0
  81. package/lib/browser/file-service-watcher.spec.js +199 -201
  82. package/lib/browser/file-service-watcher.spec.js.map +1 -1
  83. package/lib/browser/file-service.d.ts +4 -4
  84. package/lib/browser/file-service.d.ts.map +1 -1
  85. package/lib/browser/file-service.js +179 -182
  86. package/lib/browser/file-service.js.map +1 -1
  87. package/lib/browser/file-tree/file-tree-container.js +12 -15
  88. package/lib/browser/file-tree/file-tree-container.js.map +1 -1
  89. package/lib/browser/file-tree/file-tree-decorator-adapter.js +23 -31
  90. package/lib/browser/file-tree/file-tree-decorator-adapter.js.map +1 -1
  91. package/lib/browser/file-tree/file-tree-decorator-adapter.spec.js +26 -28
  92. package/lib/browser/file-tree/file-tree-decorator-adapter.spec.js.map +1 -1
  93. package/lib/browser/file-tree/file-tree-label-provider.d.ts +1 -1
  94. package/lib/browser/file-tree/file-tree-label-provider.d.ts.map +1 -1
  95. package/lib/browser/file-tree/file-tree-label-provider.js +13 -18
  96. package/lib/browser/file-tree/file-tree-label-provider.js.map +1 -1
  97. package/lib/browser/file-tree/file-tree-model.d.ts +5 -5
  98. package/lib/browser/file-tree/file-tree-model.d.ts.map +1 -1
  99. package/lib/browser/file-tree/file-tree-model.js +48 -52
  100. package/lib/browser/file-tree/file-tree-model.js.map +1 -1
  101. package/lib/browser/file-tree/file-tree-widget.d.ts +3 -3
  102. package/lib/browser/file-tree/file-tree-widget.d.ts.map +1 -1
  103. package/lib/browser/file-tree/file-tree-widget.js +66 -72
  104. package/lib/browser/file-tree/file-tree-widget.js.map +1 -1
  105. package/lib/browser/file-tree/file-tree.d.ts +3 -3
  106. package/lib/browser/file-tree/file-tree.d.ts.map +1 -1
  107. package/lib/browser/file-tree/file-tree.js +26 -31
  108. package/lib/browser/file-tree/file-tree.js.map +1 -1
  109. package/lib/browser/file-tree/index.d.ts +6 -6
  110. package/lib/browser/file-tree/index.d.ts.map +1 -1
  111. package/lib/browser/file-tree/index.js +6 -9
  112. package/lib/browser/file-tree/index.js.map +1 -1
  113. package/lib/browser/filesystem-frontend-contribution.d.ts +6 -6
  114. package/lib/browser/filesystem-frontend-contribution.d.ts.map +1 -1
  115. package/lib/browser/filesystem-frontend-contribution.js +75 -90
  116. package/lib/browser/filesystem-frontend-contribution.js.map +1 -1
  117. package/lib/browser/filesystem-frontend-module.js +47 -50
  118. package/lib/browser/filesystem-frontend-module.js.map +1 -1
  119. package/lib/browser/filesystem-saveable-service.d.ts +2 -2
  120. package/lib/browser/filesystem-saveable-service.d.ts.map +1 -1
  121. package/lib/browser/filesystem-saveable-service.js +35 -44
  122. package/lib/browser/filesystem-saveable-service.js.map +1 -1
  123. package/lib/browser/filesystem-watcher-error-handler.js +13 -18
  124. package/lib/browser/filesystem-watcher-error-handler.js.map +1 -1
  125. package/lib/browser/index.d.ts +4 -4
  126. package/lib/browser/index.d.ts.map +1 -1
  127. package/lib/browser/index.js +4 -7
  128. package/lib/browser/index.js.map +1 -1
  129. package/lib/browser/location/index.d.ts +2 -2
  130. package/lib/browser/location/index.d.ts.map +1 -1
  131. package/lib/browser/location/index.js +2 -5
  132. package/lib/browser/location/index.js.map +1 -1
  133. package/lib/browser/location/location-renderer.d.ts +3 -3
  134. package/lib/browser/location/location-renderer.d.ts.map +1 -1
  135. package/lib/browser/location/location-renderer.js +42 -51
  136. package/lib/browser/location/location-renderer.js.map +1 -1
  137. package/lib/browser/location/location-renderer.spec.js +61 -63
  138. package/lib/browser/location/location-renderer.spec.js.map +1 -1
  139. package/lib/browser/location/location-service.js +1 -2
  140. package/lib/browser/location/location-service.js.map +1 -1
  141. package/lib/browser/remote-file-service-contribution.d.ts +2 -2
  142. package/lib/browser/remote-file-service-contribution.d.ts.map +1 -1
  143. package/lib/browser/remote-file-service-contribution.js +8 -12
  144. package/lib/browser/remote-file-service-contribution.js.map +1 -1
  145. package/lib/browser/upload/file-upload-service-impl.d.ts +3 -3
  146. package/lib/browser/upload/file-upload-service-impl.d.ts.map +1 -1
  147. package/lib/browser/upload/file-upload-service-impl.js +55 -64
  148. package/lib/browser/upload/file-upload-service-impl.js.map +1 -1
  149. package/lib/browser/vscode-file-service-contribution.d.ts +2 -2
  150. package/lib/browser/vscode-file-service-contribution.d.ts.map +1 -1
  151. package/lib/browser/vscode-file-service-contribution.js +23 -28
  152. package/lib/browser/vscode-file-service-contribution.js.map +1 -1
  153. package/lib/browser-only/browser-only-filesystem-frontend-module.js +21 -23
  154. package/lib/browser-only/browser-only-filesystem-frontend-module.js.map +1 -1
  155. package/lib/browser-only/browser-only-filesystem-provider-server.d.ts +1 -1
  156. package/lib/browser-only/browser-only-filesystem-provider-server.d.ts.map +1 -1
  157. package/lib/browser-only/browser-only-filesystem-provider-server.js +10 -13
  158. package/lib/browser-only/browser-only-filesystem-provider-server.js.map +1 -1
  159. package/lib/browser-only/download/file-download-command-contribution.d.ts +1 -1
  160. package/lib/browser-only/download/file-download-command-contribution.d.ts.map +1 -1
  161. package/lib/browser-only/download/file-download-command-contribution.js +14 -19
  162. package/lib/browser-only/download/file-download-command-contribution.js.map +1 -1
  163. package/lib/browser-only/download/file-download-frontend-module.js +8 -10
  164. package/lib/browser-only/download/file-download-frontend-module.js.map +1 -1
  165. package/lib/browser-only/download/file-download-service.d.ts +3 -3
  166. package/lib/browser-only/download/file-download-service.d.ts.map +1 -1
  167. package/lib/browser-only/download/file-download-service.js +26 -33
  168. package/lib/browser-only/download/file-download-service.js.map +1 -1
  169. package/lib/browser-only/file-search.d.ts.map +1 -1
  170. package/lib/browser-only/file-search.js +9 -14
  171. package/lib/browser-only/file-search.js.map +1 -1
  172. package/lib/browser-only/opfs-filesystem-initialization.d.ts +1 -1
  173. package/lib/browser-only/opfs-filesystem-initialization.d.ts.map +1 -1
  174. package/lib/browser-only/opfs-filesystem-initialization.js +6 -9
  175. package/lib/browser-only/opfs-filesystem-initialization.js.map +1 -1
  176. package/lib/browser-only/opfs-filesystem-provider.d.ts +2 -2
  177. package/lib/browser-only/opfs-filesystem-provider.d.ts.map +1 -1
  178. package/lib/browser-only/opfs-filesystem-provider.js +60 -68
  179. package/lib/browser-only/opfs-filesystem-provider.js.map +1 -1
  180. package/lib/browser-only/upload/file-upload-service-impl.d.ts +3 -3
  181. package/lib/browser-only/upload/file-upload-service-impl.d.ts.map +1 -1
  182. package/lib/browser-only/upload/file-upload-service-impl.js +51 -60
  183. package/lib/browser-only/upload/file-upload-service-impl.js.map +1 -1
  184. package/lib/common/delegating-file-system-provider.d.ts +1 -1
  185. package/lib/common/delegating-file-system-provider.d.ts.map +1 -1
  186. package/lib/common/delegating-file-system-provider.js +18 -22
  187. package/lib/common/delegating-file-system-provider.js.map +1 -1
  188. package/lib/common/download/file-download.js +5 -8
  189. package/lib/common/download/file-download.js.map +1 -1
  190. package/lib/common/file-upload.js +1 -4
  191. package/lib/common/file-upload.js.map +1 -1
  192. package/lib/common/files.js +38 -58
  193. package/lib/common/files.js.map +1 -1
  194. package/lib/common/files.spec.js +22 -24
  195. package/lib/common/files.spec.js.map +1 -1
  196. package/lib/common/filesystem-preferences.js +39 -44
  197. package/lib/common/filesystem-preferences.js.map +1 -1
  198. package/lib/common/filesystem-utils.d.ts +1 -1
  199. package/lib/common/filesystem-utils.d.ts.map +1 -1
  200. package/lib/common/filesystem-utils.js +2 -5
  201. package/lib/common/filesystem-utils.js.map +1 -1
  202. package/lib/common/filesystem-utils.spec.js +227 -229
  203. package/lib/common/filesystem-utils.spec.js.map +1 -1
  204. package/lib/common/filesystem-watcher-protocol.d.ts +5 -1
  205. package/lib/common/filesystem-watcher-protocol.d.ts.map +1 -1
  206. package/lib/common/filesystem-watcher-protocol.js +2 -5
  207. package/lib/common/filesystem-watcher-protocol.js.map +1 -1
  208. package/lib/common/filesystem.js +2 -5
  209. package/lib/common/filesystem.js.map +1 -1
  210. package/lib/common/index.d.ts +3 -3
  211. package/lib/common/index.d.ts.map +1 -1
  212. package/lib/common/index.js +3 -6
  213. package/lib/common/index.js.map +1 -1
  214. package/lib/common/io.d.ts +2 -2
  215. package/lib/common/io.d.ts.map +1 -1
  216. package/lib/common/io.js +10 -13
  217. package/lib/common/io.js.map +1 -1
  218. package/lib/common/remote-file-system-provider.d.ts +1 -1
  219. package/lib/common/remote-file-system-provider.d.ts.map +1 -1
  220. package/lib/common/remote-file-system-provider.js +81 -93
  221. package/lib/common/remote-file-system-provider.js.map +1 -1
  222. package/lib/common/upload/file-upload.js +1 -4
  223. package/lib/common/upload/file-upload.js.map +1 -1
  224. package/lib/electron-browser/file-dialog/electron-file-dialog-module.js +6 -8
  225. package/lib/electron-browser/file-dialog/electron-file-dialog-module.js.map +1 -1
  226. package/lib/electron-browser/file-dialog/electron-file-dialog-service.d.ts +3 -3
  227. package/lib/electron-browser/file-dialog/electron-file-dialog-service.d.ts.map +1 -1
  228. package/lib/electron-browser/file-dialog/electron-file-dialog-service.js +20 -24
  229. package/lib/electron-browser/file-dialog/electron-file-dialog-service.js.map +1 -1
  230. package/lib/electron-browser/file-dialog/electron-file-dialog-service.spec.d.ts +2 -0
  231. package/lib/electron-browser/file-dialog/electron-file-dialog-service.spec.d.ts.map +1 -0
  232. package/lib/electron-browser/file-dialog/electron-file-dialog-service.spec.js +46 -0
  233. package/lib/electron-browser/file-dialog/electron-file-dialog-service.spec.js.map +1 -0
  234. package/lib/electron-browser/preload.js +6 -9
  235. package/lib/electron-browser/preload.js.map +1 -1
  236. package/lib/electron-common/electron-api.js +2 -5
  237. package/lib/electron-common/electron-api.js.map +1 -1
  238. package/lib/electron-main/electron-api-main.js +15 -18
  239. package/lib/electron-main/electron-api-main.js.map +1 -1
  240. package/lib/electron-main/electron-main-module.js +6 -8
  241. package/lib/electron-main/electron-main-module.js.map +1 -1
  242. package/lib/node/disk-file-system-provider.d.ts +2 -2
  243. package/lib/node/disk-file-system-provider.d.ts.map +1 -1
  244. package/lib/node/disk-file-system-provider.js +116 -121
  245. package/lib/node/disk-file-system-provider.js.map +1 -1
  246. package/lib/node/disk-file-system-provider.spec.js +77 -54
  247. package/lib/node/disk-file-system-provider.spec.js.map +1 -1
  248. package/lib/node/download/directory-archiver.js +13 -16
  249. package/lib/node/download/directory-archiver.js.map +1 -1
  250. package/lib/node/download/directory-archiver.spec.js +20 -22
  251. package/lib/node/download/directory-archiver.spec.js.map +1 -1
  252. package/lib/node/download/file-download-backend-module.js +14 -16
  253. package/lib/node/download/file-download-backend-module.js.map +1 -1
  254. package/lib/node/download/file-download-cache.js +12 -16
  255. package/lib/node/download/file-download-cache.js.map +1 -1
  256. package/lib/node/download/file-download-endpoint.d.ts +1 -1
  257. package/lib/node/download/file-download-endpoint.d.ts.map +1 -1
  258. package/lib/node/download/file-download-endpoint.js +25 -31
  259. package/lib/node/download/file-download-endpoint.js.map +1 -1
  260. package/lib/node/download/file-download-handler.d.ts +2 -2
  261. package/lib/node/download/file-download-handler.d.ts.map +1 -1
  262. package/lib/node/download/file-download-handler.js +70 -77
  263. package/lib/node/download/file-download-handler.js.map +1 -1
  264. package/lib/node/download/test/mock-directory-archiver.d.ts +1 -1
  265. package/lib/node/download/test/mock-directory-archiver.d.ts.map +1 -1
  266. package/lib/node/download/test/mock-directory-archiver.js +2 -6
  267. package/lib/node/download/test/mock-directory-archiver.js.map +1 -1
  268. package/lib/node/file-change-collection.d.ts +1 -1
  269. package/lib/node/file-change-collection.d.ts.map +1 -1
  270. package/lib/node/file-change-collection.js +1 -5
  271. package/lib/node/file-change-collection.js.map +1 -1
  272. package/lib/node/file-change-collection.spec.js +5 -7
  273. package/lib/node/file-change-collection.spec.js.map +1 -1
  274. package/lib/node/filesystem-backend-module.d.ts +3 -3
  275. package/lib/node/filesystem-backend-module.d.ts.map +1 -1
  276. package/lib/node/filesystem-backend-module.js +57 -62
  277. package/lib/node/filesystem-backend-module.js.map +1 -1
  278. package/lib/node/filesystem-watcher-client.d.ts +2 -2
  279. package/lib/node/filesystem-watcher-client.d.ts.map +1 -1
  280. package/lib/node/filesystem-watcher-client.js +11 -16
  281. package/lib/node/filesystem-watcher-client.js.map +1 -1
  282. package/lib/node/filesystem-watcher-dispatcher.d.ts +1 -1
  283. package/lib/node/filesystem-watcher-dispatcher.d.ts.map +1 -1
  284. package/lib/node/filesystem-watcher-dispatcher.js +9 -13
  285. package/lib/node/filesystem-watcher-dispatcher.js.map +1 -1
  286. package/lib/node/filesystem-watcher-service-impl.d.ts +30 -0
  287. package/lib/node/filesystem-watcher-service-impl.d.ts.map +1 -0
  288. package/lib/node/filesystem-watcher-service-impl.js +88 -0
  289. package/lib/node/filesystem-watcher-service-impl.js.map +1 -0
  290. package/lib/node/filesystem-watcher-service-impl.spec.d.ts +2 -0
  291. package/lib/node/filesystem-watcher-service-impl.spec.d.ts.map +1 -0
  292. package/lib/node/filesystem-watcher-service-impl.spec.js +199 -0
  293. package/lib/node/filesystem-watcher-service-impl.spec.js.map +1 -0
  294. package/lib/node/filesystem-watcher.d.ts +93 -0
  295. package/lib/node/filesystem-watcher.d.ts.map +1 -0
  296. package/lib/node/filesystem-watcher.js +129 -0
  297. package/lib/node/filesystem-watcher.js.map +1 -0
  298. package/lib/node/nodejs-watcher/node-directory-watcher.d.ts +175 -0
  299. package/lib/node/nodejs-watcher/node-directory-watcher.d.ts.map +1 -0
  300. package/lib/node/nodejs-watcher/node-directory-watcher.js +574 -0
  301. package/lib/node/nodejs-watcher/node-directory-watcher.js.map +1 -0
  302. package/lib/node/nodejs-watcher/node-directory-watcher.spec.d.ts +2 -0
  303. package/lib/node/nodejs-watcher/node-directory-watcher.spec.d.ts.map +1 -0
  304. package/lib/node/nodejs-watcher/node-directory-watcher.spec.js +1281 -0
  305. package/lib/node/nodejs-watcher/node-directory-watcher.spec.js.map +1 -0
  306. package/lib/node/nodejs-watcher/watch-request-router.d.ts +63 -0
  307. package/lib/node/nodejs-watcher/watch-request-router.d.ts.map +1 -0
  308. package/lib/node/nodejs-watcher/watch-request-router.js +178 -0
  309. package/lib/node/nodejs-watcher/watch-request-router.js.map +1 -0
  310. package/lib/node/nodejs-watcher/watcher-host.d.ts +50 -0
  311. package/lib/node/nodejs-watcher/watcher-host.d.ts.map +1 -0
  312. package/lib/node/nodejs-watcher/watcher-host.js +94 -0
  313. package/lib/node/nodejs-watcher/watcher-host.js.map +1 -0
  314. package/lib/node/parcel-watcher/index.js +6 -8
  315. package/lib/node/parcel-watcher/index.js.map +1 -1
  316. package/lib/node/parcel-watcher/parcel-filesystem-service.d.ts +14 -194
  317. package/lib/node/parcel-watcher/parcel-filesystem-service.d.ts.map +1 -1
  318. package/lib/node/parcel-watcher/parcel-filesystem-service.js +5 -426
  319. package/lib/node/parcel-watcher/parcel-filesystem-service.js.map +1 -1
  320. package/lib/node/parcel-watcher/parcel-filesystem-watcher.spec.js +23 -25
  321. package/lib/node/parcel-watcher/parcel-filesystem-watcher.spec.js.map +1 -1
  322. package/lib/node/parcel-watcher/parcel-options.js +1 -4
  323. package/lib/node/parcel-watcher/parcel-options.js.map +1 -1
  324. package/lib/node/parcel-watcher/parcel-watcher-exclude.spec.js +12 -16
  325. package/lib/node/parcel-watcher/parcel-watcher-exclude.spec.js.map +1 -1
  326. package/lib/node/parcel-watcher/parcel-watcher-retry.spec.js +11 -15
  327. package/lib/node/parcel-watcher/parcel-watcher-retry.spec.js.map +1 -1
  328. package/lib/node/parcel-watcher/parcel-watcher.d.ts +165 -0
  329. package/lib/node/parcel-watcher/parcel-watcher.d.ts.map +1 -0
  330. package/lib/node/parcel-watcher/parcel-watcher.js +366 -0
  331. package/lib/node/parcel-watcher/parcel-watcher.js.map +1 -0
  332. package/lib/node/test/watcher-test-helper.d.ts +21 -0
  333. package/lib/node/test/watcher-test-helper.d.ts.map +1 -0
  334. package/lib/node/test/watcher-test-helper.js +51 -0
  335. package/lib/node/test/watcher-test-helper.js.map +1 -0
  336. package/lib/node/upload/node-file-upload-service.d.ts +1 -1
  337. package/lib/node/upload/node-file-upload-service.d.ts.map +1 -1
  338. package/lib/node/upload/node-file-upload-service.js +20 -25
  339. package/lib/node/upload/node-file-upload-service.js.map +1 -1
  340. package/lib/node/upload/node-file-upload-service.spec.js +21 -23
  341. package/lib/node/upload/node-file-upload-service.spec.js.map +1 -1
  342. package/package.json +21 -7
  343. package/src/browser/breadcrumbs/filepath-breadcrumb.ts +1 -1
  344. package/src/browser/breadcrumbs/filepath-breadcrumbs-container.ts +1 -1
  345. package/src/browser/breadcrumbs/filepath-breadcrumbs-contribution.ts +5 -5
  346. package/src/browser/download/file-download-command-contribution.ts +1 -1
  347. package/src/browser/download/file-download-frontend-module.ts +3 -3
  348. package/src/browser/download/file-download-service.ts +1 -2
  349. package/src/browser/file-dialog/file-dialog-container.ts +5 -5
  350. package/src/browser/file-dialog/file-dialog-hidden-files-renderer.tsx +1 -1
  351. package/src/browser/file-dialog/file-dialog-model.ts +2 -2
  352. package/src/browser/file-dialog/file-dialog-module.ts +5 -5
  353. package/src/browser/file-dialog/file-dialog-service.ts +4 -4
  354. package/src/browser/file-dialog/file-dialog-tree-filters-renderer.spec.ts +43 -0
  355. package/src/browser/file-dialog/file-dialog-tree-filters-renderer.tsx +4 -2
  356. package/src/browser/file-dialog/file-dialog-tree.ts +2 -2
  357. package/src/browser/file-dialog/file-dialog-widget.ts +2 -2
  358. package/src/browser/file-dialog/file-dialog.ts +17 -7
  359. package/src/browser/file-dialog/index.ts +4 -4
  360. package/src/browser/file-resource.spec.ts +3 -3
  361. package/src/browser/file-resource.ts +3 -3
  362. package/src/browser/file-selection.ts +1 -1
  363. package/src/browser/file-service-activation.spec.ts +93 -0
  364. package/src/browser/file-service-copy.spec.ts +226 -0
  365. package/src/browser/file-service-watcher.spec.ts +2 -2
  366. package/src/browser/file-service.ts +22 -11
  367. package/src/browser/file-tree/file-tree-container.ts +3 -3
  368. package/src/browser/file-tree/file-tree-decorator-adapter.spec.ts +1 -1
  369. package/src/browser/file-tree/file-tree-decorator-adapter.ts +1 -1
  370. package/src/browser/file-tree/file-tree-label-provider.ts +1 -1
  371. package/src/browser/file-tree/file-tree-model.ts +12 -6
  372. package/src/browser/file-tree/file-tree-widget.tsx +8 -5
  373. package/src/browser/file-tree/file-tree.ts +3 -3
  374. package/src/browser/file-tree/index.ts +6 -6
  375. package/src/browser/filesystem-frontend-contribution.ts +6 -6
  376. package/src/browser/filesystem-frontend-module.ts +14 -14
  377. package/src/browser/filesystem-saveable-service.ts +2 -2
  378. package/src/browser/index.ts +4 -4
  379. package/src/browser/location/index.ts +2 -2
  380. package/src/browser/location/location-renderer.spec.ts +3 -3
  381. package/src/browser/location/location-renderer.tsx +3 -3
  382. package/src/browser/remote-file-service-contribution.ts +2 -2
  383. package/src/browser/upload/file-upload-service-impl.ts +5 -5
  384. package/src/browser/vscode-file-service-contribution.ts +2 -2
  385. package/src/browser-only/browser-only-filesystem-frontend-module.ts +7 -7
  386. package/src/browser-only/browser-only-filesystem-provider-server.ts +1 -1
  387. package/src/browser-only/download/file-download-command-contribution.ts +2 -2
  388. package/src/browser-only/download/file-download-frontend-module.ts +3 -3
  389. package/src/browser-only/download/file-download-service.ts +3 -3
  390. package/src/browser-only/file-search.ts +2 -1
  391. package/src/browser-only/opfs-filesystem-initialization.ts +1 -1
  392. package/src/browser-only/opfs-filesystem-provider.ts +3 -3
  393. package/src/browser-only/upload/file-upload-service-impl.ts +4 -4
  394. package/src/common/delegating-file-system-provider.ts +1 -1
  395. package/src/common/files.spec.ts +1 -1
  396. package/src/common/filesystem-utils.spec.ts +2 -2
  397. package/src/common/filesystem-utils.ts +1 -1
  398. package/src/common/filesystem-watcher-protocol.ts +5 -1
  399. package/src/common/index.ts +3 -3
  400. package/src/common/io.ts +2 -2
  401. package/src/common/remote-file-system-provider.ts +1 -1
  402. package/src/electron-browser/file-dialog/electron-file-dialog-module.ts +2 -2
  403. package/src/electron-browser/file-dialog/electron-file-dialog-service.spec.ts +57 -0
  404. package/src/electron-browser/file-dialog/electron-file-dialog-service.ts +5 -5
  405. package/src/electron-browser/preload.ts +1 -1
  406. package/src/electron-main/electron-api-main.ts +1 -1
  407. package/src/electron-main/electron-main-module.ts +1 -1
  408. package/src/node/disk-file-system-provider.spec.ts +32 -3
  409. package/src/node/disk-file-system-provider.ts +12 -8
  410. package/src/node/download/directory-archiver.spec.ts +1 -1
  411. package/src/node/download/file-download-backend-module.ts +4 -4
  412. package/src/node/download/file-download-cache.ts +1 -1
  413. package/src/node/download/file-download-endpoint.ts +4 -3
  414. package/src/node/download/file-download-handler.ts +3 -4
  415. package/src/node/download/test/mock-directory-archiver.ts +1 -1
  416. package/src/node/file-change-collection.spec.ts +2 -2
  417. package/src/node/file-change-collection.ts +1 -1
  418. package/src/node/filesystem-backend-module.ts +15 -14
  419. package/src/node/filesystem-watcher-client.ts +2 -2
  420. package/src/node/filesystem-watcher-dispatcher.ts +1 -1
  421. package/src/node/filesystem-watcher-service-impl.spec.ts +272 -0
  422. package/src/node/filesystem-watcher-service-impl.ts +109 -0
  423. package/src/node/filesystem-watcher.ts +197 -0
  424. package/src/node/nodejs-watcher/node-directory-watcher.spec.ts +1594 -0
  425. package/src/node/nodejs-watcher/node-directory-watcher.ts +664 -0
  426. package/src/node/nodejs-watcher/watch-request-router.ts +224 -0
  427. package/src/node/nodejs-watcher/watcher-host.ts +126 -0
  428. package/src/node/parcel-watcher/index.ts +3 -3
  429. package/src/node/parcel-watcher/parcel-filesystem-service.ts +14 -500
  430. package/src/node/parcel-watcher/parcel-filesystem-watcher.spec.ts +5 -5
  431. package/src/node/parcel-watcher/parcel-watcher-exclude.spec.ts +7 -11
  432. package/src/node/parcel-watcher/parcel-watcher-retry.spec.ts +6 -8
  433. package/src/node/parcel-watcher/parcel-watcher.ts +433 -0
  434. package/src/node/test/watcher-test-helper.ts +58 -0
  435. package/src/node/upload/node-file-upload-service.spec.ts +1 -1
  436. package/src/node/upload/node-file-upload-service.ts +6 -6
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  // *****************************************************************************
3
2
  // Copyright (C) 2020 TypeFox and others.
4
3
  //
@@ -23,38 +22,36 @@
23
22
  // and https://github.com/microsoft/vscode/blob/04c36be045a94fee58e5f8992d3e3fd980294a84/src/vs/workbench/services/textfile/electron-browser/nativeTextFileService.ts
24
23
  // and https://github.com/microsoft/vscode/blob/04c36be045a94fee58e5f8992d3e3fd980294a84/src/vs/workbench/services/workingCopy/common/workingCopyFileService.ts
25
24
  // and https://github.com/microsoft/vscode/blob/04c36be045a94fee58e5f8992d3e3fd980294a84/src/vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant.ts
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.FileService = exports.TextFileOperationError = exports.FileServiceContribution = void 0;
28
- const tslib_1 = require("tslib");
25
+ import { __decorate } from "tslib";
29
26
  /* eslint-disable max-len */
27
+ /* eslint-disable @stylistic/brace-style, @stylistic/semi-spacing */
30
28
  /* eslint-disable @typescript-eslint/no-shadow */
31
29
  /* eslint-disable no-null/no-null */
32
- /* eslint-disable @typescript-eslint/tslint/config */
33
30
  /* eslint-disable @typescript-eslint/no-explicit-any */
34
- const inversify_1 = require("@theia/core/shared/inversify");
35
- const promise_util_1 = require("@theia/core/lib/common/promise-util");
36
- const cancellation_1 = require("@theia/core/lib/common/cancellation");
37
- const disposable_1 = require("@theia/core/lib/common/disposable");
38
- const event_1 = require("@theia/core/lib/common/event");
39
- const contribution_provider_1 = require("@theia/core/lib/common/contribution-provider");
40
- const ternary_search_tree_1 = require("@theia/core/lib/common/ternary-search-tree");
41
- const files_1 = require("../common/files");
42
- const buffer_1 = require("@theia/core/lib/common/buffer");
43
- const stream_1 = require("@theia/core/lib/common/stream");
44
- const label_provider_1 = require("@theia/core/lib/browser/label-provider");
45
- const filesystem_preferences_1 = require("../common/filesystem-preferences");
46
- const progress_service_1 = require("@theia/core/lib/common/progress-service");
47
- const delegating_file_system_provider_1 = require("../common/delegating-file-system-provider");
48
- const encoding_registry_1 = require("@theia/core/lib/browser/encoding-registry");
49
- const encodings_1 = require("@theia/core/lib/common/encodings");
50
- const encoding_service_1 = require("@theia/core/lib/common/encoding-service");
51
- const minimatch_1 = require("minimatch");
52
- const io_1 = require("../common/io");
53
- const filesystem_watcher_error_handler_1 = require("./filesystem-watcher-error-handler");
54
- const filesystem_utils_1 = require("../common/filesystem-utils");
55
- const core_1 = require("@theia/core");
56
- exports.FileServiceContribution = Symbol('FileServiceContribution');
57
- class TextFileOperationError extends files_1.FileOperationError {
31
+ import { injectable, inject, named, postConstruct } from '@theia/core/shared/inversify';
32
+ import { timeout, Deferred } from '@theia/core/lib/common/promise-util';
33
+ import { CancellationToken, CancellationTokenSource } from '@theia/core/lib/common/cancellation';
34
+ import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
35
+ import { WaitUntilEvent, Emitter, AsyncEmitter } from '@theia/core/lib/common/event';
36
+ import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
37
+ import { TernarySearchTree } from '@theia/core/lib/common/ternary-search-tree';
38
+ import { ensureFileSystemProviderError, etag, ETAG_DISABLED, FileChangesEvent, FileOperationError, FileOperationEvent, FileSystemProviderErrorCode, FileType, hasFileFolderCopyCapability, hasOpenReadWriteCloseCapability, hasReadWriteCapability, FileStat, toFileOperationResult, toFileSystemProviderErrorCode, hasAccessCapability, hasUpdateCapability, hasFileReadStreamCapability, ReadOnlyMessageFileSystemProvider } from '../common/files.js';
39
+ import { BinaryBuffer, BinaryBufferReadable, BinaryBufferReadableStream, BinaryBufferReadableBufferedStream, BinaryBufferWriteableStream } from '@theia/core/lib/common/buffer';
40
+ import { isReadableStream, isReadableBufferedStream, transform, consumeStream, peekStream, peekReadable } from '@theia/core/lib/common/stream';
41
+ import { LabelProvider } from '@theia/core/lib/browser/label-provider';
42
+ import { FileSystemPreferences } from '../common/filesystem-preferences.js';
43
+ import { ProgressService } from '@theia/core/lib/common/progress-service';
44
+ import { DelegatingFileSystemProvider } from '../common/delegating-file-system-provider.js';
45
+ import { EncodingRegistry } from '@theia/core/lib/browser/encoding-registry';
46
+ import { UTF8, UTF8_with_bom } from '@theia/core/lib/common/encodings';
47
+ import { EncodingService } from '@theia/core/lib/common/encoding-service';
48
+ import { Minimatch } from 'minimatch';
49
+ import { readFileIntoStream } from '../common/io.js';
50
+ import { FileSystemWatcherErrorHandler } from './filesystem-watcher-error-handler.js';
51
+ import { FileSystemUtils } from '../common/filesystem-utils.js';
52
+ import { nls, ILogger } from '@theia/core';
53
+ export const FileServiceContribution = Symbol('FileServiceContribution');
54
+ export class TextFileOperationError extends FileOperationError {
58
55
  constructor(message, textFileOperationResult, options) {
59
56
  super(message, 11 /* FileOperationResult.FILE_OTHER_ERROR */);
60
57
  this.textFileOperationResult = textFileOperationResult;
@@ -62,7 +59,6 @@ class TextFileOperationError extends files_1.FileOperationError {
62
59
  Object.setPrototypeOf(this, TextFileOperationError.prototype);
63
60
  }
64
61
  }
65
- exports.TextFileOperationError = TextFileOperationError;
66
62
  /**
67
63
  * The {@link FileService} is the common facade responsible for all interactions with file systems.
68
64
  * It manages all registered {@link FileSystemProvider}s and
@@ -74,19 +70,19 @@ let FileService = class FileService {
74
70
  this.BUFFER_SIZE = 64 * 1024;
75
71
  // #region Events
76
72
  this.correlationIds = 0;
77
- this.onWillRunUserOperationEmitter = new event_1.AsyncEmitter();
73
+ this.onWillRunUserOperationEmitter = new AsyncEmitter();
78
74
  /**
79
75
  * An event that is emitted when file operation is being performed.
80
76
  * This event is triggered by user gestures.
81
77
  */
82
78
  this.onWillRunUserOperation = this.onWillRunUserOperationEmitter.event;
83
- this.onDidFailUserOperationEmitter = new event_1.AsyncEmitter();
79
+ this.onDidFailUserOperationEmitter = new AsyncEmitter();
84
80
  /**
85
81
  * An event that is emitted when file operation is failed.
86
82
  * This event is triggered by user gestures.
87
83
  */
88
84
  this.onDidFailUserOperation = this.onDidFailUserOperationEmitter.event;
89
- this.onDidRunUserOperationEmitter = new event_1.AsyncEmitter();
85
+ this.onDidRunUserOperationEmitter = new AsyncEmitter();
90
86
  /**
91
87
  * An event that is emitted when file operation is finished.
92
88
  * This event is triggered by user gestures.
@@ -94,21 +90,21 @@ let FileService = class FileService {
94
90
  this.onDidRunUserOperation = this.onDidRunUserOperationEmitter.event;
95
91
  // #endregion
96
92
  // #region File System Provider
97
- this.onDidChangeFileSystemProviderRegistrationsEmitter = new event_1.Emitter();
93
+ this.onDidChangeFileSystemProviderRegistrationsEmitter = new Emitter();
98
94
  this.onDidChangeFileSystemProviderRegistrations = this.onDidChangeFileSystemProviderRegistrationsEmitter.event;
99
- this.onWillActivateFileSystemProviderEmitter = new event_1.Emitter();
95
+ this.onWillActivateFileSystemProviderEmitter = new Emitter();
100
96
  /**
101
97
  * See `FileServiceContribution.registerProviders`.
102
98
  */
103
99
  this.onWillActivateFileSystemProvider = this.onWillActivateFileSystemProviderEmitter.event;
104
- this.onDidChangeFileSystemProviderCapabilitiesEmitter = new event_1.Emitter();
100
+ this.onDidChangeFileSystemProviderCapabilitiesEmitter = new Emitter();
105
101
  this.onDidChangeFileSystemProviderCapabilities = this.onDidChangeFileSystemProviderCapabilitiesEmitter.event;
106
- this.onDidChangeFileSystemProviderReadOnlyMessageEmitter = new event_1.Emitter();
102
+ this.onDidChangeFileSystemProviderReadOnlyMessageEmitter = new Emitter();
107
103
  this.onDidChangeFileSystemProviderReadOnlyMessage = this.onDidChangeFileSystemProviderReadOnlyMessageEmitter.event;
108
104
  this.providers = new Map();
109
105
  this.activations = new Map();
110
106
  // #endregion
111
- this.onDidRunOperationEmitter = new event_1.Emitter();
107
+ this.onDidRunOperationEmitter = new Emitter();
112
108
  /**
113
109
  * An event that is emitted when operation is finished.
114
110
  * This event is triggered by user gestures and programmatically.
@@ -116,7 +112,7 @@ let FileService = class FileService {
116
112
  this.onDidRunOperation = this.onDidRunOperationEmitter.event;
117
113
  // #endregion
118
114
  // #region File Watching
119
- this.onDidFilesChangeEmitter = new event_1.Emitter();
115
+ this.onDidFilesChangeEmitter = new Emitter();
120
116
  this.activeWatchers = new Map();
121
117
  this.recursiveWatcherIndexes = new Map();
122
118
  // #endregion
@@ -144,14 +140,14 @@ let FileService = class FileService {
144
140
  }
145
141
  this.providers.set(scheme, provider);
146
142
  this.onDidChangeFileSystemProviderRegistrationsEmitter.fire({ added: true, scheme, provider });
147
- const providerDisposables = new disposable_1.DisposableCollection();
148
- providerDisposables.push(provider.onDidChangeFile(changes => this.onDidFilesChangeEmitter.fire(new files_1.FileChangesEvent(changes))));
143
+ const providerDisposables = new DisposableCollection();
144
+ providerDisposables.push(provider.onDidChangeFile(changes => this.onDidFilesChangeEmitter.fire(new FileChangesEvent(changes))));
149
145
  providerDisposables.push(provider.onFileWatchError(() => this.handleFileWatchError()));
150
146
  providerDisposables.push(provider.onDidChangeCapabilities(() => this.onDidChangeFileSystemProviderCapabilitiesEmitter.fire({ provider, scheme })));
151
- if (files_1.ReadOnlyMessageFileSystemProvider.is(provider)) {
147
+ if (ReadOnlyMessageFileSystemProvider.is(provider)) {
152
148
  providerDisposables.push(provider.onDidChangeReadOnlyMessage(message => this.onDidChangeFileSystemProviderReadOnlyMessageEmitter.fire({ provider, scheme, message })));
153
149
  }
154
- return disposable_1.Disposable.create(() => {
150
+ return Disposable.create(() => {
155
151
  this.onDidChangeFileSystemProviderRegistrationsEmitter.fire({ added: false, scheme, provider });
156
152
  this.providers.delete(scheme);
157
153
  this.recursiveWatcherIndexes.delete(provider);
@@ -171,9 +167,18 @@ let FileService = class FileService {
171
167
  }
172
168
  let activation = this.activations.get(scheme);
173
169
  if (!activation) {
174
- const deferredActivation = new promise_util_1.Deferred();
170
+ const deferredActivation = new Deferred();
175
171
  this.activations.set(scheme, activation = deferredActivation.promise);
176
- event_1.WaitUntilEvent.fire(this.onWillActivateFileSystemProviderEmitter, { scheme }).then(() => {
172
+ // Resolve the activation as soon as a provider is registered for the scheme. Otherwise a
173
+ // slow or dangling `onWillActivateFileSystemProvider` listener whose `waitUntil` promise
174
+ // never settles would wedge this activation (and everything awaiting it) forever. See #17506.
175
+ const registration = this.onDidChangeFileSystemProviderRegistrations(event => {
176
+ if (event.added && event.scheme === scheme && event.provider) {
177
+ deferredActivation.resolve(event.provider);
178
+ }
179
+ });
180
+ deferredActivation.promise.then(() => registration.dispose(), () => registration.dispose());
181
+ WaitUntilEvent.fire(this.onWillActivateFileSystemProviderEmitter, { scheme }).then(() => {
177
182
  provider = this.providers.get(scheme);
178
183
  if (!provider) {
179
184
  const error = new Error();
@@ -202,7 +207,7 @@ let FileService = class FileService {
202
207
  }
203
208
  getReadOnlyMessage(resource) {
204
209
  const provider = this.providers.get(resource.scheme);
205
- if (files_1.ReadOnlyMessageFileSystemProvider.is(provider)) {
210
+ if (ReadOnlyMessageFileSystemProvider.is(provider)) {
206
211
  return provider.readOnlyMessage;
207
212
  }
208
213
  return undefined;
@@ -230,20 +235,20 @@ let FileService = class FileService {
230
235
  async withProvider(resource) {
231
236
  // Assert path is absolute
232
237
  if (!resource.path.isAbsolute) {
233
- throw new files_1.FileOperationError(core_1.nls.localizeByDefault("Unable to resolve filesystem provider with relative file path '{0}'", this.resourceForError(resource)), 8 /* FileOperationResult.FILE_INVALID_PATH */);
238
+ throw new FileOperationError(nls.localizeByDefault("Unable to resolve filesystem provider with relative file path '{0}'", this.resourceForError(resource)), 8 /* FileOperationResult.FILE_INVALID_PATH */);
234
239
  }
235
240
  return this.activateProvider(resource.scheme);
236
241
  }
237
242
  async withReadProvider(resource) {
238
243
  const provider = await this.withProvider(resource);
239
- if ((0, files_1.hasOpenReadWriteCloseCapability)(provider) || (0, files_1.hasReadWriteCapability)(provider)) {
244
+ if (hasOpenReadWriteCloseCapability(provider) || hasReadWriteCapability(provider)) {
240
245
  return provider;
241
246
  }
242
247
  throw new Error(`Filesystem provider for scheme '${resource.scheme}' neither has FileReadWrite, FileReadStream nor FileOpenReadWriteClose capability which is needed for the read operation.`);
243
248
  }
244
249
  async withWriteProvider(resource) {
245
250
  const provider = await this.withProvider(resource);
246
- if ((0, files_1.hasOpenReadWriteCloseCapability)(provider) || (0, files_1.hasReadWriteCapability)(provider)) {
251
+ if (hasOpenReadWriteCloseCapability(provider) || hasReadWriteCapability(provider)) {
247
252
  return provider;
248
253
  }
249
254
  throw new Error(`Filesystem provider for scheme '${resource.scheme}' neither has FileReadWrite nor FileOpenReadWriteClose capability which is needed for the write operation.`);
@@ -254,11 +259,11 @@ let FileService = class FileService {
254
259
  }
255
260
  catch (error) {
256
261
  // Specially handle file not found case as file operation result
257
- if ((0, files_1.toFileSystemProviderErrorCode)(error) === files_1.FileSystemProviderErrorCode.FileNotFound) {
258
- throw new files_1.FileOperationError(core_1.nls.localizeByDefault("Unable to resolve nonexistent file '{0}'", this.resourceForError(resource)), 1 /* FileOperationResult.FILE_NOT_FOUND */);
262
+ if (toFileSystemProviderErrorCode(error) === FileSystemProviderErrorCode.FileNotFound) {
263
+ throw new FileOperationError(nls.localizeByDefault("Unable to resolve nonexistent file '{0}'", this.resourceForError(resource)), 1 /* FileOperationResult.FILE_NOT_FOUND */);
259
264
  }
260
265
  // Bubble up any other error as is
261
- throw (0, files_1.ensureFileSystemProviderError)(error);
266
+ throw ensureFileSystemProviderError(error);
262
267
  }
263
268
  }
264
269
  async doResolveFile(resource, options) {
@@ -271,7 +276,7 @@ let FileService = class FileService {
271
276
  return this.toFileStat(provider, resource, stat, undefined, !!resolveMetadata, (stat, siblings) => {
272
277
  // lazy trie to check for recursive resolving
273
278
  if (!trie) {
274
- trie = ternary_search_tree_1.TernarySearchTree.forUris(!!(provider.capabilities & 1024 /* FileSystemProviderCapabilities.PathCaseSensitive */));
279
+ trie = TernarySearchTree.forUris(!!(provider.capabilities & 1024 /* FileSystemProviderCapabilities.PathCaseSensitive */));
275
280
  trie.set(resource, true);
276
281
  if (Array.isArray(resolveTo) && resolveTo.length) {
277
282
  resolveTo.forEach(uri => trie.set(uri, true));
@@ -289,7 +294,7 @@ let FileService = class FileService {
289
294
  });
290
295
  }
291
296
  async toFileStat(provider, resource, stat, siblings, resolveMetadata, recurse) {
292
- const fileStat = files_1.FileStat.fromStat(resource, stat);
297
+ const fileStat = FileStat.fromStat(resource, stat);
293
298
  // check to recurse for directories
294
299
  if (fileStat.isDirectory && recurse(fileStat, siblings)) {
295
300
  try {
@@ -354,7 +359,7 @@ let FileService = class FileService {
354
359
  */
355
360
  async access(resource, mode) {
356
361
  const provider = await this.withProvider(resource);
357
- if (!(0, files_1.hasAccessCapability)(provider)) {
362
+ if (!hasAccessCapability(provider)) {
358
363
  return false;
359
364
  }
360
365
  try {
@@ -380,7 +385,7 @@ let FileService = class FileService {
380
385
  */
381
386
  async fsPath(resource) {
382
387
  const provider = await this.withProvider(resource);
383
- if (!(0, files_1.hasAccessCapability)(provider)) {
388
+ if (!hasAccessCapability(provider)) {
384
389
  return resource.path.toString();
385
390
  }
386
391
  return provider.fsPath(resource);
@@ -421,15 +426,15 @@ let FileService = class FileService {
421
426
  });
422
427
  return {
423
428
  ...bufferStream,
424
- encoding: decoder.detected.encoding || encodings_1.UTF8,
425
- value: await (0, stream_1.consumeStream)(decoder.stream, strings => strings.join(''))
429
+ encoding: decoder.detected.encoding || UTF8,
430
+ value: await consumeStream(decoder.stream, strings => strings.join(''))
426
431
  };
427
432
  }
428
433
  async readStream(resource, options) {
429
434
  const [bufferStream, decoder] = await this.doRead(resource, options);
430
435
  return {
431
436
  ...bufferStream,
432
- encoding: decoder.detected.encoding || encodings_1.UTF8,
437
+ encoding: decoder.detected.encoding || UTF8,
433
438
  value: decoder.stream
434
439
  };
435
440
  }
@@ -441,7 +446,7 @@ let FileService = class FileService {
441
446
  const content = await this.readFile(resource, options);
442
447
  bufferStream = {
443
448
  ...content,
444
- value: buffer_1.BinaryBufferReadableStream.fromBuffer(content.value)
449
+ value: BinaryBufferReadableStream.fromBuffer(content.value)
445
450
  };
446
451
  }
447
452
  else {
@@ -453,7 +458,7 @@ let FileService = class FileService {
453
458
  });
454
459
  // validate binary
455
460
  if (options?.acceptTextOnly && decoder.detected.seemsBinary) {
456
- throw new TextFileOperationError(core_1.nls.localizeByDefault('File seems to be binary and cannot be opened as text'), 0 /* TextFileOperationResult.FILE_IS_BINARY */, options);
461
+ throw new TextFileOperationError(nls.localizeByDefault('File seems to be binary and cannot be opened as text'), 0 /* TextFileOperationResult.FILE_IS_BINARY */, options);
457
462
  }
458
463
  return [bufferStream, decoder];
459
464
  }
@@ -472,7 +477,7 @@ let FileService = class FileService {
472
477
  const provider = this.throwIfFileSystemIsReadonly(await this.withWriteProvider(resource), resource);
473
478
  try {
474
479
  await this.validateWriteFile(provider, resource, options);
475
- if ((0, files_1.hasUpdateCapability)(provider)) {
480
+ if (hasUpdateCapability(provider)) {
476
481
  const encoding = await this.getEncodingForResource(resource, options ? options.encoding : undefined);
477
482
  ;
478
483
  const stat = await provider.updateFile(resource, changes, {
@@ -480,7 +485,7 @@ let FileService = class FileService {
480
485
  writeEncoding: encoding,
481
486
  overwriteEncoding: options.overwriteEncoding || false
482
487
  });
483
- return Object.assign(files_1.FileStat.fromStat(resource, stat), { encoding: stat.encoding });
488
+ return Object.assign(FileStat.fromStat(resource, stat), { encoding: stat.encoding });
484
489
  }
485
490
  else {
486
491
  throw new Error('incremental file update is not supported');
@@ -492,15 +497,15 @@ let FileService = class FileService {
492
497
  }
493
498
  // #endregion
494
499
  // #region File Reading/Writing
495
- async createFile(resource, bufferOrReadableOrStream = buffer_1.BinaryBuffer.fromString(''), options) {
500
+ async createFile(resource, bufferOrReadableOrStream = BinaryBuffer.fromString(''), options) {
496
501
  // validate overwrite
497
502
  if (!options?.overwrite && await this.exists(resource)) {
498
- throw new files_1.FileOperationError(core_1.nls.localizeByDefault("Unable to create file '{0}' that already exists when overwrite flag is not set", this.resourceForError(resource)), 3 /* FileOperationResult.FILE_MODIFIED_SINCE */, options);
503
+ throw new FileOperationError(nls.localizeByDefault("Unable to create file '{0}' that already exists when overwrite flag is not set", this.resourceForError(resource)), 3 /* FileOperationResult.FILE_MODIFIED_SINCE */, options);
499
504
  }
500
505
  // do write into file (this will create it too)
501
506
  const fileStat = await this.writeFile(resource, bufferOrReadableOrStream);
502
507
  // events
503
- this.onDidRunOperationEmitter.fire(new files_1.FileOperationEvent(resource, 0 /* FileOperation.CREATE */, fileStat));
508
+ this.onDidRunOperationEmitter.fire(new FileOperationEvent(resource, 0 /* FileOperation.CREATE */, fileStat));
504
509
  return fileStat;
505
510
  }
506
511
  async writeFile(resource, bufferOrReadableOrStream, options) {
@@ -517,30 +522,30 @@ let FileService = class FileService {
517
522
  // unbuffered to reduce the overhead. If the Readable has more data to provide
518
523
  // we continue to write buffered.
519
524
  let bufferOrReadableOrStreamOrBufferedStream;
520
- if ((0, files_1.hasReadWriteCapability)(provider) && !(bufferOrReadableOrStream instanceof buffer_1.BinaryBuffer)) {
521
- if ((0, stream_1.isReadableStream)(bufferOrReadableOrStream)) {
522
- const bufferedStream = await (0, stream_1.peekStream)(bufferOrReadableOrStream, 3);
525
+ if (hasReadWriteCapability(provider) && !(bufferOrReadableOrStream instanceof BinaryBuffer)) {
526
+ if (isReadableStream(bufferOrReadableOrStream)) {
527
+ const bufferedStream = await peekStream(bufferOrReadableOrStream, 3);
523
528
  if (bufferedStream.ended) {
524
- bufferOrReadableOrStreamOrBufferedStream = buffer_1.BinaryBuffer.concat(bufferedStream.buffer);
529
+ bufferOrReadableOrStreamOrBufferedStream = BinaryBuffer.concat(bufferedStream.buffer);
525
530
  }
526
531
  else {
527
532
  bufferOrReadableOrStreamOrBufferedStream = bufferedStream;
528
533
  }
529
534
  }
530
535
  else {
531
- bufferOrReadableOrStreamOrBufferedStream = (0, stream_1.peekReadable)(bufferOrReadableOrStream, data => buffer_1.BinaryBuffer.concat(data), 3);
536
+ bufferOrReadableOrStreamOrBufferedStream = peekReadable(bufferOrReadableOrStream, data => BinaryBuffer.concat(data), 3);
532
537
  }
533
538
  }
534
539
  else {
535
540
  bufferOrReadableOrStreamOrBufferedStream = bufferOrReadableOrStream;
536
541
  }
537
542
  // write file: unbuffered (only if data to write is a buffer, or the provider has no buffered write capability)
538
- if (!(0, files_1.hasOpenReadWriteCloseCapability)(provider) || ((0, files_1.hasReadWriteCapability)(provider) && bufferOrReadableOrStreamOrBufferedStream instanceof buffer_1.BinaryBuffer)) {
543
+ if (!hasOpenReadWriteCloseCapability(provider) || (hasReadWriteCapability(provider) && bufferOrReadableOrStreamOrBufferedStream instanceof BinaryBuffer)) {
539
544
  await this.doWriteUnbuffered(provider, resource, bufferOrReadableOrStreamOrBufferedStream);
540
545
  }
541
546
  // write file: buffered
542
547
  else {
543
- await this.doWriteBuffered(provider, resource, bufferOrReadableOrStreamOrBufferedStream instanceof buffer_1.BinaryBuffer ? buffer_1.BinaryBufferReadable.fromBuffer(bufferOrReadableOrStreamOrBufferedStream) : bufferOrReadableOrStreamOrBufferedStream);
548
+ await this.doWriteBuffered(provider, resource, bufferOrReadableOrStreamOrBufferedStream instanceof BinaryBuffer ? BinaryBufferReadable.fromBuffer(bufferOrReadableOrStreamOrBufferedStream) : bufferOrReadableOrStreamOrBufferedStream);
544
549
  }
545
550
  }
546
551
  catch (error) {
@@ -557,11 +562,11 @@ let FileService = class FileService {
557
562
  return undefined; // file might not exist
558
563
  }
559
564
  // file cannot be directory
560
- if ((stat.type & files_1.FileType.Directory) !== 0) {
561
- throw new files_1.FileOperationError(core_1.nls.localizeByDefault("Unable to write file '{0}' that is actually a directory", this.resourceForError(resource)), 0 /* FileOperationResult.FILE_IS_DIRECTORY */, options);
565
+ if ((stat.type & FileType.Directory) !== 0) {
566
+ throw new FileOperationError(nls.localizeByDefault("Unable to write file '{0}' that is actually a directory", this.resourceForError(resource)), 0 /* FileOperationResult.FILE_IS_DIRECTORY */, options);
562
567
  }
563
568
  if (this.modifiedSince(stat, options)) {
564
- throw new files_1.FileOperationError(core_1.nls.localizeByDefault('File Modified Since'), 3 /* FileOperationResult.FILE_MODIFIED_SINCE */, options);
569
+ throw new FileOperationError(nls.localizeByDefault('File Modified Since'), 3 /* FileOperationResult.FILE_MODIFIED_SINCE */, options);
565
570
  }
566
571
  return stat;
567
572
  }
@@ -580,9 +585,9 @@ let FileService = class FileService {
580
585
  * the file content for comparison which would be much slower to compute.
581
586
  */
582
587
  modifiedSince(stat, options) {
583
- return !!options && typeof options.mtime === 'number' && typeof options.etag === 'string' && options.etag !== files_1.ETAG_DISABLED &&
588
+ return !!options && typeof options.mtime === 'number' && typeof options.etag === 'string' && options.etag !== ETAG_DISABLED &&
584
589
  typeof stat.mtime === 'number' && typeof stat.size === 'number' &&
585
- options.mtime < stat.mtime && options.etag !== (0, files_1.etag)({ mtime: options.mtime /* not using stat.mtime for a reason, see above */, size: stat.size });
590
+ options.mtime < stat.mtime && options.etag !== etag({ mtime: options.mtime /* not using stat.mtime for a reason, see above */, size: stat.size });
586
591
  }
587
592
  shouldReadUnbuffered(options) {
588
593
  // optimization: since we know that the caller does not
@@ -604,7 +609,7 @@ let FileService = class FileService {
604
609
  });
605
610
  return {
606
611
  ...stream,
607
- value: await buffer_1.BinaryBufferReadableStream.toBuffer(stream.value)
612
+ value: await BinaryBufferReadableStream.toBuffer(stream.value)
608
613
  };
609
614
  }
610
615
  async readFileStream(resource, options) {
@@ -616,7 +621,7 @@ let FileService = class FileService {
616
621
  // when any error occurs. this allows us to resolve
617
622
  // the content of the file while resolving metadata
618
623
  // but still cancel the operation in certain cases.
619
- const cancellableSource = new cancellation_1.CancellationTokenSource();
624
+ const cancellableSource = new CancellationTokenSource();
620
625
  // validate read operation
621
626
  const statPromise = this.validateReadFile(resource, options).then(stat => stat, error => {
622
627
  cancellableSource.cancel();
@@ -627,16 +632,16 @@ let FileService = class FileService {
627
632
  // due to the likelyhood of hitting a NOT_MODIFIED_SINCE result.
628
633
  // otherwise, we let it run in parallel to the file reading for
629
634
  // optimal startup performance.
630
- if (options && typeof options.etag === 'string' && options.etag !== files_1.ETAG_DISABLED) {
635
+ if (options && typeof options.etag === 'string' && options.etag !== ETAG_DISABLED) {
631
636
  await statPromise;
632
637
  }
633
638
  let fileStreamPromise;
634
639
  // read unbuffered (only if either preferred, or the provider has no buffered read capability)
635
- if (!((0, files_1.hasOpenReadWriteCloseCapability)(provider) || (0, files_1.hasFileReadStreamCapability)(provider)) || ((0, files_1.hasReadWriteCapability)(provider) && options?.preferUnbuffered)) {
640
+ if (!(hasOpenReadWriteCloseCapability(provider) || hasFileReadStreamCapability(provider)) || (hasReadWriteCapability(provider) && options?.preferUnbuffered)) {
636
641
  fileStreamPromise = this.readFileUnbuffered(provider, resource, options);
637
642
  }
638
643
  // read streamed (always prefer over primitive buffered read)
639
- else if ((0, files_1.hasFileReadStreamCapability)(provider)) {
644
+ else if (hasFileReadStreamCapability(provider)) {
640
645
  fileStreamPromise = Promise.resolve(this.readFileStreamed(provider, resource, cancellableSource.token, options));
641
646
  }
642
647
  // read buffered
@@ -655,14 +660,14 @@ let FileService = class FileService {
655
660
  }
656
661
  readFileStreamed(provider, resource, token, options = Object.create(null)) {
657
662
  const fileStream = provider.readFileStream(resource, options, token);
658
- return (0, stream_1.transform)(fileStream, {
659
- data: data => data instanceof buffer_1.BinaryBuffer ? data : buffer_1.BinaryBuffer.wrap(data),
663
+ return transform(fileStream, {
664
+ data: data => data instanceof BinaryBuffer ? data : BinaryBuffer.wrap(data),
660
665
  error: error => this.asFileOperationError("Unable to read file '{0}' ({1})", resource, error, options)
661
- }, data => buffer_1.BinaryBuffer.concat(data));
666
+ }, data => BinaryBuffer.concat(data));
662
667
  }
663
668
  readFileBuffered(provider, resource, token, options = Object.create(null)) {
664
- const stream = buffer_1.BinaryBufferWriteableStream.create();
665
- (0, io_1.readFileIntoStream)(provider, resource, stream, data => data, {
669
+ const stream = BinaryBufferWriteableStream.create();
670
+ readFileIntoStream(provider, resource, stream, data => data, {
666
671
  ...options,
667
672
  bufferSize: this.BUFFER_SIZE,
668
673
  errorTransformer: error => this.asFileOperationError("Unable to read file '{0}' ({1})", resource, error, options)
@@ -673,7 +678,7 @@ let FileService = class FileService {
673
678
  throw this.asFileOperationError(message, resource, error, options);
674
679
  }
675
680
  asFileOperationError(message, resource, error, options) {
676
- const fileOperationError = new files_1.FileOperationError(core_1.nls.localizeByDefault(message, this.resourceForError(resource), (0, files_1.ensureFileSystemProviderError)(error).toString()), (0, files_1.toFileOperationResult)(error), options);
681
+ const fileOperationError = new FileOperationError(nls.localizeByDefault(message, this.resourceForError(resource), ensureFileSystemProviderError(error).toString()), toFileOperationResult(error), options);
677
682
  fileOperationError.stack = `${fileOperationError.stack}\nCaused by: ${error.stack}`;
678
683
  return fileOperationError;
679
684
  }
@@ -689,17 +694,17 @@ let FileService = class FileService {
689
694
  }
690
695
  // Throw if file is too large to load
691
696
  this.validateReadFileLimits(resource, buffer.byteLength, options);
692
- return buffer_1.BinaryBufferReadableStream.fromBuffer(buffer_1.BinaryBuffer.wrap(buffer));
697
+ return BinaryBufferReadableStream.fromBuffer(BinaryBuffer.wrap(buffer));
693
698
  }
694
699
  async validateReadFile(resource, options) {
695
700
  const stat = await this.resolve(resource, { resolveMetadata: true });
696
701
  // Throw if resource is a directory
697
702
  if (stat.isDirectory) {
698
- throw new files_1.FileOperationError(core_1.nls.localizeByDefault("Unable to read file '{0}' that is actually a directory", this.resourceForError(resource)), 0 /* FileOperationResult.FILE_IS_DIRECTORY */, options);
703
+ throw new FileOperationError(nls.localizeByDefault("Unable to read file '{0}' that is actually a directory", this.resourceForError(resource)), 0 /* FileOperationResult.FILE_IS_DIRECTORY */, options);
699
704
  }
700
705
  // Throw if file not modified since (unless disabled)
701
- if (options && typeof options.etag === 'string' && options.etag !== files_1.ETAG_DISABLED && options.etag === stat.etag) {
702
- throw new files_1.FileOperationError(core_1.nls.localizeByDefault('File not modified since'), 2 /* FileOperationResult.FILE_NOT_MODIFIED_SINCE */, options);
706
+ if (options && typeof options.etag === 'string' && options.etag !== ETAG_DISABLED && options.etag === stat.etag) {
707
+ throw new FileOperationError(nls.localizeByDefault('File not modified since'), 2 /* FileOperationResult.FILE_NOT_MODIFIED_SINCE */, options);
703
708
  }
704
709
  // Throw if file is too large to load
705
710
  this.validateReadFileLimits(resource, stat.size, options);
@@ -715,7 +720,7 @@ let FileService = class FileService {
715
720
  tooLargeErrorResult = 7 /* FileOperationResult.FILE_TOO_LARGE */;
716
721
  }
717
722
  if (typeof tooLargeErrorResult === 'number') {
718
- throw new files_1.FileOperationError(core_1.nls.localizeByDefault("Unable to read file '{0}' that is too large to open", this.resourceForError(resource)), tooLargeErrorResult);
723
+ throw new FileOperationError(nls.localizeByDefault("Unable to read file '{0}' that is too large to open", this.resourceForError(resource)), tooLargeErrorResult);
719
724
  }
720
725
  }
721
726
  }
@@ -746,7 +751,7 @@ let FileService = class FileService {
746
751
  const mode = await this.doMoveCopy(sourceProvider, source, targetProvider, target, 'move', !!overwrite);
747
752
  // resolve and send events
748
753
  const fileStat = await this.resolve(target, { resolveMetadata: true });
749
- this.onDidRunOperationEmitter.fire(new files_1.FileOperationEvent(source, mode === 'move' ? 2 /* FileOperation.MOVE */ : 3 /* FileOperation.COPY */, fileStat));
754
+ this.onDidRunOperationEmitter.fire(new FileOperationEvent(source, mode === 'move' ? 2 /* FileOperation.MOVE */ : 3 /* FileOperation.COPY */, fileStat));
750
755
  return fileStat;
751
756
  }
752
757
  async copy(source, target, options) {
@@ -774,7 +779,7 @@ let FileService = class FileService {
774
779
  const mode = await this.doMoveCopy(sourceProvider, source, targetProvider, target, 'copy', !!overwrite);
775
780
  // resolve and send events
776
781
  const fileStat = await this.resolve(target, { resolveMetadata: true });
777
- this.onDidRunOperationEmitter.fire(new files_1.FileOperationEvent(source, mode === 'copy' ? 3 /* FileOperation.COPY */ : 2 /* FileOperation.MOVE */, fileStat));
782
+ this.onDidRunOperationEmitter.fire(new FileOperationEvent(source, mode === 'copy' ? 3 /* FileOperation.COPY */ : 2 /* FileOperation.MOVE */, fileStat));
778
783
  return fileStat;
779
784
  }
780
785
  async doMoveCopy(sourceProvider, source, targetProvider, target, mode, overwrite) {
@@ -787,7 +792,7 @@ let FileService = class FileService {
787
792
  if (exists && !overwrite) {
788
793
  const parent = await this.resolve(target.parent);
789
794
  const targetFileStat = await this.resolve(target);
790
- target = filesystem_utils_1.FileSystemUtils.generateUniqueResourceURI(parent, target, targetFileStat.isDirectory, isSameResourceWithDifferentPathCase ? 'copy' : undefined);
795
+ target = FileSystemUtils.generateUniqueResourceURI(parent, target, targetFileStat.isDirectory, isSameResourceWithDifferentPathCase ? 'copy' : undefined);
791
796
  }
792
797
  // delete as needed (unless target is same resource with different path case)
793
798
  if (exists && !isSameResourceWithDifferentPathCase && overwrite) {
@@ -798,7 +803,7 @@ let FileService = class FileService {
798
803
  // copy source => target
799
804
  if (mode === 'copy') {
800
805
  // same provider with fast copy: leverage copy() functionality
801
- if (sourceProvider === targetProvider && (0, files_1.hasFileFolderCopyCapability)(sourceProvider)) {
806
+ if (sourceProvider === targetProvider && hasFileFolderCopyCapability(sourceProvider)) {
802
807
  await sourceProvider.copy(source, target, { overwrite });
803
808
  }
804
809
  // when copying via buffer/unbuffered, we have to manually
@@ -831,19 +836,19 @@ let FileService = class FileService {
831
836
  }
832
837
  async doCopyFile(sourceProvider, source, targetProvider, target) {
833
838
  // copy: source (buffered) => target (buffered)
834
- if ((0, files_1.hasOpenReadWriteCloseCapability)(sourceProvider) && (0, files_1.hasOpenReadWriteCloseCapability)(targetProvider)) {
839
+ if (hasOpenReadWriteCloseCapability(sourceProvider) && hasOpenReadWriteCloseCapability(targetProvider)) {
835
840
  return this.doPipeBuffered(sourceProvider, source, targetProvider, target);
836
841
  }
837
842
  // copy: source (buffered) => target (unbuffered)
838
- if ((0, files_1.hasOpenReadWriteCloseCapability)(sourceProvider) && (0, files_1.hasReadWriteCapability)(targetProvider)) {
843
+ if (hasOpenReadWriteCloseCapability(sourceProvider) && hasReadWriteCapability(targetProvider)) {
839
844
  return this.doPipeBufferedToUnbuffered(sourceProvider, source, targetProvider, target);
840
845
  }
841
846
  // copy: source (unbuffered) => target (buffered)
842
- if ((0, files_1.hasReadWriteCapability)(sourceProvider) && (0, files_1.hasOpenReadWriteCloseCapability)(targetProvider)) {
847
+ if (hasReadWriteCapability(sourceProvider) && hasOpenReadWriteCloseCapability(targetProvider)) {
843
848
  return this.doPipeUnbufferedToBuffered(sourceProvider, source, targetProvider, target);
844
849
  }
845
850
  // copy: source (unbuffered) => target (unbuffered)
846
- if ((0, files_1.hasReadWriteCapability)(sourceProvider) && (0, files_1.hasReadWriteCapability)(targetProvider)) {
851
+ if (hasReadWriteCapability(sourceProvider) && hasReadWriteCapability(targetProvider)) {
847
852
  return this.doPipeUnbuffered(sourceProvider, source, targetProvider, target);
848
853
  }
849
854
  }
@@ -872,10 +877,10 @@ let FileService = class FileService {
872
877
  isSameResourceWithDifferentPathCase = source.toString().toLowerCase() === target.toString().toLowerCase();
873
878
  }
874
879
  if (isSameResourceWithDifferentPathCase && mode === 'copy') {
875
- throw new Error(core_1.nls.localizeByDefault("Unable to move/copy when source '{0}' is parent of target '{1}'.", this.resourceForError(source), this.resourceForError(target)));
880
+ throw new Error(nls.localizeByDefault("Unable to move/copy when source '{0}' is parent of target '{1}'.", this.resourceForError(source), this.resourceForError(target)));
876
881
  }
877
- if (!isSameResourceWithDifferentPathCase && target.isEqualOrParent(source, isPathCaseSensitive)) {
878
- throw new Error(core_1.nls.localizeByDefault("Unable to move/copy when source '{0}' is parent of target '{1}'.", this.resourceForError(source), this.resourceForError(target)));
882
+ if (!isSameResourceWithDifferentPathCase && source.isEqualOrParent(target, isPathCaseSensitive)) {
883
+ throw new Error(nls.localizeByDefault("Unable to move/copy when source '{0}' is parent of target '{1}'.", this.resourceForError(source), this.resourceForError(target)));
879
884
  }
880
885
  }
881
886
  // Extra checks if target exists and this is not a rename
@@ -885,8 +890,8 @@ let FileService = class FileService {
885
890
  // it as it would delete the source as well. In this case we have to throw
886
891
  if (sourceProvider === targetProvider) {
887
892
  const isPathCaseSensitive = !!(sourceProvider.capabilities & 1024 /* FileSystemProviderCapabilities.PathCaseSensitive */);
888
- if (source.isEqualOrParent(target, isPathCaseSensitive)) {
889
- throw new Error(core_1.nls.localizeByDefault("Unable to move/copy '{0}' into '{1}' since a file would replace the folder it is contained in.", this.resourceForError(source), this.resourceForError(target)));
893
+ if (target.isEqualOrParent(source, isPathCaseSensitive)) {
894
+ throw new Error(nls.localizeByDefault("Unable to move/copy '{0}' into '{1}' since a file would replace the folder it is contained in.", this.resourceForError(source), this.resourceForError(target)));
890
895
  }
891
896
  }
892
897
  }
@@ -903,7 +908,7 @@ let FileService = class FileService {
903
908
  this.onDidRunUserOperationEmitter.fire({ correlationId: this.correlationIds++, operation: 0 /* FileOperation.CREATE */, target: resource });
904
909
  }
905
910
  else {
906
- this.onDidRunOperationEmitter.fire(new files_1.FileOperationEvent(resource, 0 /* FileOperation.CREATE */, fileStat));
911
+ this.onDidRunOperationEmitter.fire(new FileOperationEvent(resource, 0 /* FileOperation.CREATE */, fileStat));
907
912
  }
908
913
  return fileStat;
909
914
  }
@@ -913,14 +918,14 @@ let FileService = class FileService {
913
918
  while (!directory.path.isRoot) {
914
919
  try {
915
920
  const stat = await provider.stat(directory);
916
- if ((stat.type & files_1.FileType.Directory) === 0) {
917
- throw new Error(core_1.nls.localizeByDefault("Unable to create folder '{0}' that already exists but is not a directory", this.resourceForError(directory)));
921
+ if ((stat.type & FileType.Directory) === 0) {
922
+ throw new Error(nls.localizeByDefault("Unable to create folder '{0}' that already exists but is not a directory", this.resourceForError(directory)));
918
923
  }
919
924
  break; // we have hit a directory that exists -> good
920
925
  }
921
926
  catch (error) {
922
927
  // Bubble up any other error that is not file not found
923
- if ((0, files_1.toFileSystemProviderErrorCode)(error) !== files_1.FileSystemProviderErrorCode.FileNotFound) {
928
+ if (toFileSystemProviderErrorCode(error) !== FileSystemProviderErrorCode.FileNotFound) {
924
929
  throw error;
925
930
  }
926
931
  // Upon error, remember directories that need to be created
@@ -936,7 +941,7 @@ let FileService = class FileService {
936
941
  await provider.mkdir(directory);
937
942
  }
938
943
  catch (error) {
939
- if ((0, files_1.toFileSystemProviderErrorCode)(error) !== files_1.FileSystemProviderErrorCode.FileExists) {
944
+ if (toFileSystemProviderErrorCode(error) !== FileSystemProviderErrorCode.FileExists) {
940
945
  // For mkdirp() we tolerate that the mkdir() call fails
941
946
  // in case the folder already exists. This follows node.js
942
947
  // own implementation of fs.mkdir({ recursive: true }) and
@@ -971,25 +976,25 @@ let FileService = class FileService {
971
976
  // Validate trash support
972
977
  const useTrash = !!options?.useTrash;
973
978
  if (useTrash && !(provider.capabilities & 4096 /* FileSystemProviderCapabilities.Trash */)) {
974
- throw new Error(core_1.nls.localizeByDefault("Unable to delete file '{0}' via trash because provider does not support it.", this.resourceForError(resource)));
979
+ throw new Error(nls.localizeByDefault("Unable to delete file '{0}' via trash because provider does not support it.", this.resourceForError(resource)));
975
980
  }
976
981
  // Validate delete
977
982
  const exists = await this.exists(resource);
978
983
  if (!exists) {
979
- throw new files_1.FileOperationError(core_1.nls.localizeByDefault("Unable to delete nonexistent file '{0}'", this.resourceForError(resource)), 1 /* FileOperationResult.FILE_NOT_FOUND */);
984
+ throw new FileOperationError(nls.localizeByDefault("Unable to delete nonexistent file '{0}'", this.resourceForError(resource)), 1 /* FileOperationResult.FILE_NOT_FOUND */);
980
985
  }
981
986
  // Validate recursive
982
987
  const recursive = !!options?.recursive;
983
988
  if (!recursive && exists) {
984
989
  const stat = await this.resolve(resource);
985
990
  if (stat.isDirectory && Array.isArray(stat.children) && stat.children.length > 0) {
986
- throw new Error(core_1.nls.localizeByDefault("Unable to delete non-empty folder '{0}'.", this.resourceForError(resource)));
991
+ throw new Error(nls.localizeByDefault("Unable to delete non-empty folder '{0}'.", this.resourceForError(resource)));
987
992
  }
988
993
  }
989
994
  // Delete through provider
990
995
  await provider.delete(resource, { recursive, useTrash });
991
996
  // Events
992
- this.onDidRunOperationEmitter.fire(new files_1.FileOperationEvent(resource, 1 /* FileOperation.DELETE */));
997
+ this.onDidRunOperationEmitter.fire(new FileOperationEvent(resource, 1 /* FileOperation.DELETE */));
993
998
  }
994
999
  /**
995
1000
  * An event that is emitted when files are changed on the disk.
@@ -1003,7 +1008,7 @@ let FileService = class FileService {
1003
1008
  excludes: this.resolveWatcherExcludes(resource, options.excludes)
1004
1009
  };
1005
1010
  let watchDisposed = false;
1006
- let watchDisposable = disposable_1.Disposable.create(() => watchDisposed = true);
1011
+ let watchDisposable = Disposable.create(() => watchDisposed = true);
1007
1012
  // Watch and wire in disposable which is async but
1008
1013
  // check if we got disposed meanwhile and forward
1009
1014
  this.doWatch(resource, resolvedOptions).then(disposable => {
@@ -1014,7 +1019,7 @@ let FileService = class FileService {
1014
1019
  watchDisposable = disposable;
1015
1020
  }
1016
1021
  }, error => this.logger.error(error));
1017
- return disposable_1.Disposable.create(() => watchDisposable.dispose());
1022
+ return Disposable.create(() => watchDisposable.dispose());
1018
1023
  }
1019
1024
  /**
1020
1025
  * Resolve the effective exclude globs for a watcher: the caller-supplied `excludes`, the
@@ -1079,7 +1084,7 @@ let FileService = class FileService {
1079
1084
  realWatcher,
1080
1085
  subsumingParent: undefined,
1081
1086
  subsumedChildren: new Set(),
1082
- compiledExcludes: options.excludes.map(pattern => new minimatch_1.Minimatch(pattern, { dot: true })),
1087
+ compiledExcludes: options.excludes.map(pattern => new Minimatch(pattern, { dot: true })),
1083
1088
  };
1084
1089
  return recursiveEntry;
1085
1090
  }
@@ -1091,7 +1096,7 @@ let FileService = class FileService {
1091
1096
  };
1092
1097
  }
1093
1098
  createWatcherDisposable(key, entry) {
1094
- return disposable_1.Disposable.create(() => {
1099
+ return Disposable.create(() => {
1095
1100
  entry.count--;
1096
1101
  if (entry.count === 0) {
1097
1102
  this.disposeWatcherEntry(key, entry);
@@ -1283,7 +1288,7 @@ let FileService = class FileService {
1283
1288
  let tree = this.recursiveWatcherIndexes.get(provider);
1284
1289
  if (!tree) {
1285
1290
  const caseSensitive = !!(provider.capabilities & 1024 /* FileSystemProviderCapabilities.PathCaseSensitive */);
1286
- tree = ternary_search_tree_1.TernarySearchTree.forUris(caseSensitive);
1291
+ tree = TernarySearchTree.forUris(caseSensitive);
1287
1292
  this.recursiveWatcherIndexes.set(provider, tree);
1288
1293
  }
1289
1294
  return tree;
@@ -1325,7 +1330,7 @@ let FileService = class FileService {
1325
1330
  const handle = await provider.open(resource, { create: true });
1326
1331
  // write into handle until all bytes from buffer have been written
1327
1332
  try {
1328
- if ((0, stream_1.isReadableStream)(readableOrStreamOrBufferedStream) || (0, stream_1.isReadableBufferedStream)(readableOrStreamOrBufferedStream)) {
1333
+ if (isReadableStream(readableOrStreamOrBufferedStream) || isReadableBufferedStream(readableOrStreamOrBufferedStream)) {
1329
1334
  await this.doWriteStreamBufferedQueued(provider, handle, readableOrStreamOrBufferedStream);
1330
1335
  }
1331
1336
  else {
@@ -1333,7 +1338,7 @@ let FileService = class FileService {
1333
1338
  }
1334
1339
  }
1335
1340
  catch (error) {
1336
- throw (0, files_1.ensureFileSystemProviderError)(error);
1341
+ throw ensureFileSystemProviderError(error);
1337
1342
  }
1338
1343
  finally {
1339
1344
  // close handle always
@@ -1346,9 +1351,9 @@ let FileService = class FileService {
1346
1351
  let stream;
1347
1352
  // Buffered stream: consume the buffer first by writing
1348
1353
  // it to the target before reading from the stream.
1349
- if ((0, stream_1.isReadableBufferedStream)(streamOrBufferedStream)) {
1354
+ if (isReadableBufferedStream(streamOrBufferedStream)) {
1350
1355
  if (streamOrBufferedStream.buffer.length > 0) {
1351
- const chunk = buffer_1.BinaryBuffer.concat(streamOrBufferedStream.buffer);
1356
+ const chunk = BinaryBuffer.concat(streamOrBufferedStream.buffer);
1352
1357
  await this.doWriteBuffer(provider, handle, chunk, chunk.byteLength, posInFile, 0);
1353
1358
  posInFile += chunk.byteLength;
1354
1359
  }
@@ -1403,17 +1408,17 @@ let FileService = class FileService {
1403
1408
  }
1404
1409
  async doWriteUnbufferedQueued(provider, resource, bufferOrReadableOrStreamOrBufferedStream) {
1405
1410
  let buffer;
1406
- if (bufferOrReadableOrStreamOrBufferedStream instanceof buffer_1.BinaryBuffer) {
1411
+ if (bufferOrReadableOrStreamOrBufferedStream instanceof BinaryBuffer) {
1407
1412
  buffer = bufferOrReadableOrStreamOrBufferedStream;
1408
1413
  }
1409
- else if ((0, stream_1.isReadableStream)(bufferOrReadableOrStreamOrBufferedStream)) {
1410
- buffer = await buffer_1.BinaryBufferReadableStream.toBuffer(bufferOrReadableOrStreamOrBufferedStream);
1414
+ else if (isReadableStream(bufferOrReadableOrStreamOrBufferedStream)) {
1415
+ buffer = await BinaryBufferReadableStream.toBuffer(bufferOrReadableOrStreamOrBufferedStream);
1411
1416
  }
1412
- else if ((0, stream_1.isReadableBufferedStream)(bufferOrReadableOrStreamOrBufferedStream)) {
1413
- buffer = await buffer_1.BinaryBufferReadableBufferedStream.toBuffer(bufferOrReadableOrStreamOrBufferedStream);
1417
+ else if (isReadableBufferedStream(bufferOrReadableOrStreamOrBufferedStream)) {
1418
+ buffer = await BinaryBufferReadableBufferedStream.toBuffer(bufferOrReadableOrStreamOrBufferedStream);
1414
1419
  }
1415
1420
  else {
1416
- buffer = buffer_1.BinaryBufferReadable.toBuffer(bufferOrReadableOrStreamOrBufferedStream);
1421
+ buffer = BinaryBufferReadable.toBuffer(bufferOrReadableOrStreamOrBufferedStream);
1417
1422
  }
1418
1423
  return provider.writeFile(resource, buffer.buffer, { create: true, overwrite: true });
1419
1424
  }
@@ -1427,7 +1432,7 @@ let FileService = class FileService {
1427
1432
  // Open handles
1428
1433
  sourceHandle = await sourceProvider.open(source, { create: false });
1429
1434
  targetHandle = await targetProvider.open(target, { create: true });
1430
- const buffer = buffer_1.BinaryBuffer.alloc(this.BUFFER_SIZE);
1435
+ const buffer = BinaryBuffer.alloc(this.BUFFER_SIZE);
1431
1436
  let posInFile = 0;
1432
1437
  let posInBuffer = 0;
1433
1438
  let bytesRead = 0;
@@ -1447,7 +1452,7 @@ let FileService = class FileService {
1447
1452
  } while (bytesRead > 0);
1448
1453
  }
1449
1454
  catch (error) {
1450
- throw (0, files_1.ensureFileSystemProviderError)(error);
1455
+ throw ensureFileSystemProviderError(error);
1451
1456
  }
1452
1457
  finally {
1453
1458
  await Promise.all([
@@ -1471,10 +1476,10 @@ let FileService = class FileService {
1471
1476
  // Read entire buffer from source and write buffered
1472
1477
  try {
1473
1478
  const buffer = await sourceProvider.readFile(source);
1474
- await this.doWriteBuffer(targetProvider, targetHandle, buffer_1.BinaryBuffer.wrap(buffer), buffer.byteLength, 0, 0);
1479
+ await this.doWriteBuffer(targetProvider, targetHandle, BinaryBuffer.wrap(buffer), buffer.byteLength, 0, 0);
1475
1480
  }
1476
1481
  catch (error) {
1477
- throw (0, files_1.ensureFileSystemProviderError)(error);
1482
+ throw ensureFileSystemProviderError(error);
1478
1483
  }
1479
1484
  finally {
1480
1485
  await targetProvider.close(targetHandle);
@@ -1482,13 +1487,13 @@ let FileService = class FileService {
1482
1487
  }
1483
1488
  async doPipeBufferedToUnbuffered(sourceProvider, source, targetProvider, target) {
1484
1489
  // Read buffer via stream buffered
1485
- const buffer = await buffer_1.BinaryBufferReadableStream.toBuffer(this.readFileBuffered(sourceProvider, source, cancellation_1.CancellationToken.None));
1490
+ const buffer = await BinaryBufferReadableStream.toBuffer(this.readFileBuffered(sourceProvider, source, CancellationToken.None));
1486
1491
  // Write buffer into target at once
1487
1492
  await this.doWriteUnbuffered(targetProvider, target, buffer);
1488
1493
  }
1489
1494
  throwIfFileSystemIsReadonly(provider, resource) {
1490
1495
  if (provider.capabilities & 2048 /* FileSystemProviderCapabilities.Readonly */) {
1491
- throw new files_1.FileOperationError(core_1.nls.localizeByDefault("Unable to modify read-only file '{0}'", this.resourceForError(resource)), 6 /* FileOperationResult.FILE_PERMISSION_DENIED */);
1496
+ throw new FileOperationError(nls.localizeByDefault("Unable to modify read-only file '{0}'", this.resourceForError(resource)), 6 /* FileOperationResult.FILE_PERMISSION_DENIED */);
1492
1497
  }
1493
1498
  return provider;
1494
1499
  }
@@ -1497,7 +1502,7 @@ let FileService = class FileService {
1497
1502
  }
1498
1503
  addFileOperationParticipant(participant) {
1499
1504
  this.participants.push(participant);
1500
- return disposable_1.Disposable.create(() => {
1505
+ return Disposable.create(() => {
1501
1506
  const index = this.participants.indexOf(participant);
1502
1507
  if (index > -1) {
1503
1508
  this.participants.splice(index, 1);
@@ -1509,7 +1514,7 @@ let FileService = class FileService {
1509
1514
  if (participantsTimeout <= 0 || this.participants.length === 0) {
1510
1515
  return;
1511
1516
  }
1512
- const cancellationTokenSource = new cancellation_1.CancellationTokenSource();
1517
+ const cancellationTokenSource = new CancellationTokenSource();
1513
1518
  return this.progressService.withProgress(this.progressLabel(operation), 'notification', async () => {
1514
1519
  for (const participant of this.participants) {
1515
1520
  if (cancellationTokenSource.token.isCancellationRequested) {
@@ -1519,7 +1524,7 @@ let FileService = class FileService {
1519
1524
  const promise = participant.participate(target, source, operation, participantsTimeout, cancellationTokenSource.token);
1520
1525
  await Promise.race([
1521
1526
  promise,
1522
- (0, promise_util_1.timeout)(participantsTimeout, cancellationTokenSource.token).then(() => cancellationTokenSource.dispose(), () => { })
1527
+ timeout(participantsTimeout, cancellationTokenSource.token).then(() => cancellationTokenSource.dispose(), () => { })
1523
1528
  ]);
1524
1529
  }
1525
1530
  catch (err) {
@@ -1533,13 +1538,13 @@ let FileService = class FileService {
1533
1538
  progressLabel(operation) {
1534
1539
  switch (operation) {
1535
1540
  case 0 /* FileOperation.CREATE */:
1536
- return core_1.nls.localizeByDefault("Running 'File Create' participants...");
1541
+ return nls.localizeByDefault("Running 'File Create' participants...");
1537
1542
  case 2 /* FileOperation.MOVE */:
1538
- return core_1.nls.localizeByDefault("Running 'File Rename' participants...");
1543
+ return nls.localizeByDefault("Running 'File Rename' participants...");
1539
1544
  case 3 /* FileOperation.COPY */:
1540
- return core_1.nls.localizeByDefault("Running 'File Copy' participants...");
1545
+ return nls.localizeByDefault("Running 'File Copy' participants...");
1541
1546
  case 1 /* FileOperation.DELETE */:
1542
- return core_1.nls.localizeByDefault("Running 'File Delete' participants...");
1547
+ return nls.localizeByDefault("Running 'File Delete' participants...");
1543
1548
  }
1544
1549
  }
1545
1550
  // #endregion
@@ -1549,7 +1554,7 @@ let FileService = class FileService {
1549
1554
  return this.encodingService.toResourceEncoding(encoding, {
1550
1555
  overwriteEncoding: options?.overwriteEncoding,
1551
1556
  read: async (length) => {
1552
- const buffer = await buffer_1.BinaryBufferReadableStream.toBuffer((await this.readFileStream(resource, { length })).value);
1557
+ const buffer = await BinaryBufferReadableStream.toBuffer((await this.readFileStream(resource, { length })).value);
1553
1558
  return buffer.buffer;
1554
1559
  }
1555
1560
  });
@@ -1558,8 +1563,8 @@ let FileService = class FileService {
1558
1563
  let preferredEncoding;
1559
1564
  // Encoding passed in as option
1560
1565
  if (options?.encoding) {
1561
- if (detectedEncoding === encodings_1.UTF8_with_bom && options.encoding === encodings_1.UTF8) {
1562
- preferredEncoding = encodings_1.UTF8_with_bom; // indicate the file has BOM if we are to resolve with UTF 8
1566
+ if (detectedEncoding === UTF8_with_bom && options.encoding === UTF8) {
1567
+ preferredEncoding = UTF8_with_bom; // indicate the file has BOM if we are to resolve with UTF 8
1563
1568
  }
1564
1569
  else {
1565
1570
  preferredEncoding = options.encoding; // give passed in encoding highest priority
@@ -1568,6 +1573,9 @@ let FileService = class FileService {
1568
1573
  else if (detectedEncoding) {
1569
1574
  preferredEncoding = detectedEncoding;
1570
1575
  }
1576
+ else if (this.preferences.get('files.encoding', undefined, resource.toString()) === UTF8_with_bom) {
1577
+ preferredEncoding = UTF8; // if we did not detect UTF 8 BOM before, this can only be UTF 8 then
1578
+ }
1571
1579
  return this.getEncodingForResource(resource, preferredEncoding);
1572
1580
  }
1573
1581
  async getEncodingForResource(resource, preferredEncoding) {
@@ -1582,7 +1590,7 @@ let FileService = class FileService {
1582
1590
  */
1583
1591
  async toUnderlyingResource(resource) {
1584
1592
  let provider = await this.withProvider(resource);
1585
- while (provider instanceof delegating_file_system_provider_1.DelegatingFileSystemProvider) {
1593
+ while (provider instanceof DelegatingFileSystemProvider) {
1586
1594
  resource = provider.toUnderlyingResource(resource);
1587
1595
  provider = await this.withProvider(resource);
1588
1596
  }
@@ -1593,48 +1601,37 @@ let FileService = class FileService {
1593
1601
  this.watcherErrorHandler.handleError();
1594
1602
  }
1595
1603
  };
1596
- exports.FileService = FileService;
1597
- tslib_1.__decorate([
1598
- (0, inversify_1.inject)(label_provider_1.LabelProvider),
1599
- tslib_1.__metadata("design:type", label_provider_1.LabelProvider)
1604
+ __decorate([
1605
+ inject(LabelProvider)
1600
1606
  ], FileService.prototype, "labelProvider", void 0);
1601
- tslib_1.__decorate([
1602
- (0, inversify_1.inject)(filesystem_preferences_1.FileSystemPreferences),
1603
- tslib_1.__metadata("design:type", Object)
1607
+ __decorate([
1608
+ inject(FileSystemPreferences)
1604
1609
  ], FileService.prototype, "preferences", void 0);
1605
- tslib_1.__decorate([
1606
- (0, inversify_1.inject)(progress_service_1.ProgressService),
1607
- tslib_1.__metadata("design:type", progress_service_1.ProgressService)
1610
+ __decorate([
1611
+ inject(ProgressService)
1608
1612
  ], FileService.prototype, "progressService", void 0);
1609
- tslib_1.__decorate([
1610
- (0, inversify_1.inject)(encoding_registry_1.EncodingRegistry),
1611
- tslib_1.__metadata("design:type", encoding_registry_1.EncodingRegistry)
1613
+ __decorate([
1614
+ inject(EncodingRegistry)
1612
1615
  ], FileService.prototype, "encodingRegistry", void 0);
1613
- tslib_1.__decorate([
1614
- (0, inversify_1.inject)(encoding_service_1.EncodingService),
1615
- tslib_1.__metadata("design:type", encoding_service_1.EncodingService)
1616
+ __decorate([
1617
+ inject(EncodingService)
1616
1618
  ], FileService.prototype, "encodingService", void 0);
1617
- tslib_1.__decorate([
1618
- (0, inversify_1.inject)(contribution_provider_1.ContributionProvider),
1619
- (0, inversify_1.named)(exports.FileServiceContribution),
1620
- tslib_1.__metadata("design:type", Object)
1619
+ __decorate([
1620
+ inject(ContributionProvider),
1621
+ named(FileServiceContribution)
1621
1622
  ], FileService.prototype, "contributions", void 0);
1622
- tslib_1.__decorate([
1623
- (0, inversify_1.inject)(filesystem_watcher_error_handler_1.FileSystemWatcherErrorHandler),
1624
- tslib_1.__metadata("design:type", filesystem_watcher_error_handler_1.FileSystemWatcherErrorHandler)
1623
+ __decorate([
1624
+ inject(FileSystemWatcherErrorHandler)
1625
1625
  ], FileService.prototype, "watcherErrorHandler", void 0);
1626
- tslib_1.__decorate([
1627
- (0, inversify_1.inject)(core_1.ILogger),
1628
- (0, inversify_1.named)('filesystem:FileService'),
1629
- tslib_1.__metadata("design:type", Object)
1626
+ __decorate([
1627
+ inject(ILogger),
1628
+ named('filesystem:FileService')
1630
1629
  ], FileService.prototype, "logger", void 0);
1631
- tslib_1.__decorate([
1632
- (0, inversify_1.postConstruct)(),
1633
- tslib_1.__metadata("design:type", Function),
1634
- tslib_1.__metadata("design:paramtypes", []),
1635
- tslib_1.__metadata("design:returntype", void 0)
1630
+ __decorate([
1631
+ postConstruct()
1636
1632
  ], FileService.prototype, "init", null);
1637
- exports.FileService = FileService = tslib_1.__decorate([
1638
- (0, inversify_1.injectable)()
1633
+ FileService = __decorate([
1634
+ injectable()
1639
1635
  ], FileService);
1636
+ export { FileService };
1640
1637
  //# sourceMappingURL=file-service.js.map