@theia/filesystem 1.77.0-next.99 → 1.77.0
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.
- package/lib/browser/breadcrumbs/filepath-breadcrumb.js +4 -8
- package/lib/browser/breadcrumbs/filepath-breadcrumb.js.map +1 -1
- package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.d.ts +1 -1
- package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.d.ts.map +1 -1
- package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.js +18 -25
- package/lib/browser/breadcrumbs/filepath-breadcrumbs-container.js.map +1 -1
- package/lib/browser/breadcrumbs/filepath-breadcrumbs-contribution.d.ts +5 -5
- package/lib/browser/breadcrumbs/filepath-breadcrumbs-contribution.d.ts.map +1 -1
- package/lib/browser/breadcrumbs/filepath-breadcrumbs-contribution.js +27 -33
- package/lib/browser/breadcrumbs/filepath-breadcrumbs-contribution.js.map +1 -1
- package/lib/browser/download/file-download-command-contribution.d.ts +1 -1
- package/lib/browser/download/file-download-command-contribution.d.ts.map +1 -1
- package/lib/browser/download/file-download-command-contribution.js +28 -33
- package/lib/browser/download/file-download-command-contribution.js.map +1 -1
- package/lib/browser/download/file-download-frontend-module.js +8 -10
- package/lib/browser/download/file-download-frontend-module.js.map +1 -1
- package/lib/browser/download/file-download-service.d.ts +1 -1
- package/lib/browser/download/file-download-service.d.ts.map +1 -1
- package/lib/browser/download/file-download-service.js +19 -24
- package/lib/browser/download/file-download-service.js.map +1 -1
- package/lib/browser/file-dialog/file-dialog-container.d.ts +1 -1
- package/lib/browser/file-dialog/file-dialog-container.d.ts.map +1 -1
- package/lib/browser/file-dialog/file-dialog-container.js +25 -30
- package/lib/browser/file-dialog/file-dialog-container.js.map +1 -1
- package/lib/browser/file-dialog/file-dialog-hidden-files-renderer.d.ts +1 -1
- package/lib/browser/file-dialog/file-dialog-hidden-files-renderer.d.ts.map +1 -1
- package/lib/browser/file-dialog/file-dialog-hidden-files-renderer.js +13 -21
- package/lib/browser/file-dialog/file-dialog-hidden-files-renderer.js.map +1 -1
- package/lib/browser/file-dialog/file-dialog-model.d.ts +2 -2
- package/lib/browser/file-dialog/file-dialog-model.d.ts.map +1 -1
- package/lib/browser/file-dialog/file-dialog-model.js +20 -27
- package/lib/browser/file-dialog/file-dialog-model.js.map +1 -1
- package/lib/browser/file-dialog/file-dialog-module.js +21 -23
- package/lib/browser/file-dialog/file-dialog-module.js.map +1 -1
- package/lib/browser/file-dialog/file-dialog-service.d.ts +4 -4
- package/lib/browser/file-dialog/file-dialog-service.d.ts.map +1 -1
- package/lib/browser/file-dialog/file-dialog-service.js +29 -38
- package/lib/browser/file-dialog/file-dialog-service.js.map +1 -1
- package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.d.ts +1 -1
- package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.d.ts.map +1 -1
- package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.js +16 -21
- package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.js.map +1 -1
- package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.spec.js +9 -11
- package/lib/browser/file-dialog/file-dialog-tree-filters-renderer.spec.js.map +1 -1
- package/lib/browser/file-dialog/file-dialog-tree.d.ts +2 -2
- package/lib/browser/file-dialog/file-dialog-tree.d.ts.map +1 -1
- package/lib/browser/file-dialog/file-dialog-tree.js +8 -11
- package/lib/browser/file-dialog/file-dialog-tree.js.map +1 -1
- package/lib/browser/file-dialog/file-dialog-widget.d.ts +2 -2
- package/lib/browser/file-dialog/file-dialog-widget.d.ts.map +1 -1
- package/lib/browser/file-dialog/file-dialog-widget.js +18 -23
- package/lib/browser/file-dialog/file-dialog-widget.js.map +1 -1
- package/lib/browser/file-dialog/file-dialog.d.ts +6 -6
- package/lib/browser/file-dialog/file-dialog.d.ts.map +1 -1
- package/lib/browser/file-dialog/file-dialog.js +114 -132
- package/lib/browser/file-dialog/file-dialog.js.map +1 -1
- package/lib/browser/file-dialog/index.d.ts +4 -4
- package/lib/browser/file-dialog/index.d.ts.map +1 -1
- package/lib/browser/file-dialog/index.js +4 -7
- package/lib/browser/file-dialog/index.js.map +1 -1
- package/lib/browser/file-resource.d.ts +2 -2
- package/lib/browser/file-resource.d.ts.map +1 -1
- package/lib/browser/file-resource.js +64 -71
- package/lib/browser/file-resource.js.map +1 -1
- package/lib/browser/file-resource.spec.js +39 -42
- package/lib/browser/file-resource.spec.js.map +1 -1
- package/lib/browser/file-selection.d.ts +1 -1
- package/lib/browser/file-selection.d.ts.map +1 -1
- package/lib/browser/file-selection.js +7 -10
- package/lib/browser/file-selection.js.map +1 -1
- package/lib/browser/file-service-activation.spec.js +14 -16
- package/lib/browser/file-service-activation.spec.js.map +1 -1
- package/lib/browser/file-service-copy.spec.js +44 -47
- package/lib/browser/file-service-copy.spec.js.map +1 -1
- package/lib/browser/file-service-watcher.spec.js +199 -202
- package/lib/browser/file-service-watcher.spec.js.map +1 -1
- package/lib/browser/file-service.d.ts +3 -3
- package/lib/browser/file-service.d.ts.map +1 -1
- package/lib/browser/file-service.js +166 -181
- package/lib/browser/file-service.js.map +1 -1
- package/lib/browser/file-tree/file-tree-container.js +12 -15
- package/lib/browser/file-tree/file-tree-container.js.map +1 -1
- package/lib/browser/file-tree/file-tree-decorator-adapter.js +23 -31
- package/lib/browser/file-tree/file-tree-decorator-adapter.js.map +1 -1
- package/lib/browser/file-tree/file-tree-decorator-adapter.spec.js +26 -29
- package/lib/browser/file-tree/file-tree-decorator-adapter.spec.js.map +1 -1
- package/lib/browser/file-tree/file-tree-label-provider.d.ts +1 -1
- package/lib/browser/file-tree/file-tree-label-provider.d.ts.map +1 -1
- package/lib/browser/file-tree/file-tree-label-provider.js +13 -18
- package/lib/browser/file-tree/file-tree-label-provider.js.map +1 -1
- package/lib/browser/file-tree/file-tree-model.d.ts +5 -5
- package/lib/browser/file-tree/file-tree-model.d.ts.map +1 -1
- package/lib/browser/file-tree/file-tree-model.js +48 -52
- package/lib/browser/file-tree/file-tree-model.js.map +1 -1
- package/lib/browser/file-tree/file-tree-widget.d.ts +3 -3
- package/lib/browser/file-tree/file-tree-widget.d.ts.map +1 -1
- package/lib/browser/file-tree/file-tree-widget.js +66 -72
- package/lib/browser/file-tree/file-tree-widget.js.map +1 -1
- package/lib/browser/file-tree/file-tree.d.ts +3 -3
- package/lib/browser/file-tree/file-tree.d.ts.map +1 -1
- package/lib/browser/file-tree/file-tree.js +26 -31
- package/lib/browser/file-tree/file-tree.js.map +1 -1
- package/lib/browser/file-tree/index.d.ts +6 -6
- package/lib/browser/file-tree/index.d.ts.map +1 -1
- package/lib/browser/file-tree/index.js +6 -9
- package/lib/browser/file-tree/index.js.map +1 -1
- package/lib/browser/filesystem-frontend-contribution.d.ts +6 -6
- package/lib/browser/filesystem-frontend-contribution.d.ts.map +1 -1
- package/lib/browser/filesystem-frontend-contribution.js +75 -90
- package/lib/browser/filesystem-frontend-contribution.js.map +1 -1
- package/lib/browser/filesystem-frontend-module.js +47 -50
- package/lib/browser/filesystem-frontend-module.js.map +1 -1
- package/lib/browser/filesystem-saveable-service.d.ts +2 -2
- package/lib/browser/filesystem-saveable-service.d.ts.map +1 -1
- package/lib/browser/filesystem-saveable-service.js +35 -44
- package/lib/browser/filesystem-saveable-service.js.map +1 -1
- package/lib/browser/filesystem-watcher-error-handler.js +13 -18
- package/lib/browser/filesystem-watcher-error-handler.js.map +1 -1
- package/lib/browser/index.d.ts +4 -4
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +4 -7
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/location/index.d.ts +2 -2
- package/lib/browser/location/index.d.ts.map +1 -1
- package/lib/browser/location/index.js +2 -5
- package/lib/browser/location/index.js.map +1 -1
- package/lib/browser/location/location-renderer.d.ts +3 -3
- package/lib/browser/location/location-renderer.d.ts.map +1 -1
- package/lib/browser/location/location-renderer.js +42 -51
- package/lib/browser/location/location-renderer.js.map +1 -1
- package/lib/browser/location/location-renderer.spec.js +61 -64
- package/lib/browser/location/location-renderer.spec.js.map +1 -1
- package/lib/browser/location/location-service.js +1 -2
- package/lib/browser/location/location-service.js.map +1 -1
- package/lib/browser/remote-file-service-contribution.d.ts +2 -2
- package/lib/browser/remote-file-service-contribution.d.ts.map +1 -1
- package/lib/browser/remote-file-service-contribution.js +8 -12
- package/lib/browser/remote-file-service-contribution.js.map +1 -1
- package/lib/browser/upload/file-upload-service-impl.d.ts +3 -3
- package/lib/browser/upload/file-upload-service-impl.d.ts.map +1 -1
- package/lib/browser/upload/file-upload-service-impl.js +55 -64
- package/lib/browser/upload/file-upload-service-impl.js.map +1 -1
- package/lib/browser/vscode-file-service-contribution.d.ts +2 -2
- package/lib/browser/vscode-file-service-contribution.d.ts.map +1 -1
- package/lib/browser/vscode-file-service-contribution.js +23 -28
- package/lib/browser/vscode-file-service-contribution.js.map +1 -1
- package/lib/browser-only/browser-only-filesystem-frontend-module.js +21 -23
- package/lib/browser-only/browser-only-filesystem-frontend-module.js.map +1 -1
- package/lib/browser-only/browser-only-filesystem-provider-server.d.ts +1 -1
- package/lib/browser-only/browser-only-filesystem-provider-server.d.ts.map +1 -1
- package/lib/browser-only/browser-only-filesystem-provider-server.js +10 -13
- package/lib/browser-only/browser-only-filesystem-provider-server.js.map +1 -1
- package/lib/browser-only/download/file-download-command-contribution.d.ts +1 -1
- package/lib/browser-only/download/file-download-command-contribution.d.ts.map +1 -1
- package/lib/browser-only/download/file-download-command-contribution.js +14 -19
- package/lib/browser-only/download/file-download-command-contribution.js.map +1 -1
- package/lib/browser-only/download/file-download-frontend-module.js +8 -10
- package/lib/browser-only/download/file-download-frontend-module.js.map +1 -1
- package/lib/browser-only/download/file-download-service.d.ts +3 -3
- package/lib/browser-only/download/file-download-service.d.ts.map +1 -1
- package/lib/browser-only/download/file-download-service.js +26 -33
- package/lib/browser-only/download/file-download-service.js.map +1 -1
- package/lib/browser-only/file-search.d.ts.map +1 -1
- package/lib/browser-only/file-search.js +9 -15
- package/lib/browser-only/file-search.js.map +1 -1
- package/lib/browser-only/opfs-filesystem-initialization.d.ts +1 -1
- package/lib/browser-only/opfs-filesystem-initialization.d.ts.map +1 -1
- package/lib/browser-only/opfs-filesystem-initialization.js +6 -9
- package/lib/browser-only/opfs-filesystem-initialization.js.map +1 -1
- package/lib/browser-only/opfs-filesystem-provider.d.ts +2 -2
- package/lib/browser-only/opfs-filesystem-provider.d.ts.map +1 -1
- package/lib/browser-only/opfs-filesystem-provider.js +60 -68
- package/lib/browser-only/opfs-filesystem-provider.js.map +1 -1
- package/lib/browser-only/upload/file-upload-service-impl.d.ts +3 -3
- package/lib/browser-only/upload/file-upload-service-impl.d.ts.map +1 -1
- package/lib/browser-only/upload/file-upload-service-impl.js +51 -60
- package/lib/browser-only/upload/file-upload-service-impl.js.map +1 -1
- package/lib/common/delegating-file-system-provider.d.ts +1 -1
- package/lib/common/delegating-file-system-provider.d.ts.map +1 -1
- package/lib/common/delegating-file-system-provider.js +18 -22
- package/lib/common/delegating-file-system-provider.js.map +1 -1
- package/lib/common/download/file-download.js +5 -8
- package/lib/common/download/file-download.js.map +1 -1
- package/lib/common/file-upload.js +1 -4
- package/lib/common/file-upload.js.map +1 -1
- package/lib/common/files.js +38 -59
- package/lib/common/files.js.map +1 -1
- package/lib/common/files.spec.js +22 -25
- package/lib/common/files.spec.js.map +1 -1
- package/lib/common/filesystem-preferences.js +39 -44
- package/lib/common/filesystem-preferences.js.map +1 -1
- package/lib/common/filesystem-utils.d.ts +1 -1
- package/lib/common/filesystem-utils.d.ts.map +1 -1
- package/lib/common/filesystem-utils.js +2 -5
- package/lib/common/filesystem-utils.js.map +1 -1
- package/lib/common/filesystem-utils.spec.js +227 -229
- package/lib/common/filesystem-utils.spec.js.map +1 -1
- package/lib/common/filesystem-watcher-protocol.d.ts +1 -1
- package/lib/common/filesystem-watcher-protocol.d.ts.map +1 -1
- package/lib/common/filesystem-watcher-protocol.js +2 -5
- package/lib/common/filesystem-watcher-protocol.js.map +1 -1
- package/lib/common/filesystem.js +2 -5
- package/lib/common/filesystem.js.map +1 -1
- package/lib/common/index.d.ts +3 -3
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +3 -6
- package/lib/common/index.js.map +1 -1
- package/lib/common/io.d.ts +2 -2
- package/lib/common/io.d.ts.map +1 -1
- package/lib/common/io.js +10 -13
- package/lib/common/io.js.map +1 -1
- package/lib/common/remote-file-system-provider.d.ts +5 -5
- package/lib/common/remote-file-system-provider.d.ts.map +1 -1
- package/lib/common/remote-file-system-provider.js +81 -93
- package/lib/common/remote-file-system-provider.js.map +1 -1
- package/lib/common/upload/file-upload.js +1 -4
- package/lib/common/upload/file-upload.js.map +1 -1
- package/lib/electron-browser/file-dialog/electron-file-dialog-module.js +6 -8
- package/lib/electron-browser/file-dialog/electron-file-dialog-module.js.map +1 -1
- package/lib/electron-browser/file-dialog/electron-file-dialog-service.d.ts +3 -3
- package/lib/electron-browser/file-dialog/electron-file-dialog-service.d.ts.map +1 -1
- package/lib/electron-browser/file-dialog/electron-file-dialog-service.js +21 -23
- package/lib/electron-browser/file-dialog/electron-file-dialog-service.js.map +1 -1
- package/lib/electron-browser/file-dialog/electron-file-dialog-service.spec.js +33 -12
- package/lib/electron-browser/file-dialog/electron-file-dialog-service.spec.js.map +1 -1
- package/lib/electron-browser/preload.js +6 -9
- package/lib/electron-browser/preload.js.map +1 -1
- package/lib/electron-common/electron-api.d.ts +4 -0
- package/lib/electron-common/electron-api.d.ts.map +1 -1
- package/lib/electron-common/electron-api.js +2 -5
- package/lib/electron-common/electron-api.js.map +1 -1
- package/lib/electron-main/electron-api-main.d.ts.map +1 -1
- package/lib/electron-main/electron-api-main.js +19 -18
- package/lib/electron-main/electron-api-main.js.map +1 -1
- package/lib/electron-main/electron-main-module.js +6 -8
- package/lib/electron-main/electron-main-module.js.map +1 -1
- package/lib/node/archive/archive-extractor.d.ts +86 -0
- package/lib/node/archive/archive-extractor.d.ts.map +1 -0
- package/lib/node/archive/archive-extractor.js +290 -0
- package/lib/node/archive/archive-extractor.js.map +1 -0
- package/lib/node/archive/archive-extractor.spec.d.ts +2 -0
- package/lib/node/archive/archive-extractor.spec.d.ts.map +1 -0
- package/lib/node/archive/archive-extractor.spec.js +317 -0
- package/lib/node/archive/archive-extractor.spec.js.map +1 -0
- package/lib/node/archive/test/test-archives.d.ts +20 -0
- package/lib/node/archive/test/test-archives.d.ts.map +1 -0
- package/lib/node/archive/test/test-archives.js +97 -0
- package/lib/node/archive/test/test-archives.js.map +1 -0
- package/lib/node/disk-file-system-provider.d.ts +2 -2
- package/lib/node/disk-file-system-provider.d.ts.map +1 -1
- package/lib/node/disk-file-system-provider.js +111 -119
- package/lib/node/disk-file-system-provider.js.map +1 -1
- package/lib/node/disk-file-system-provider.spec.js +53 -56
- package/lib/node/disk-file-system-provider.spec.js.map +1 -1
- package/lib/node/download/directory-archiver.js +13 -16
- package/lib/node/download/directory-archiver.js.map +1 -1
- package/lib/node/download/directory-archiver.spec.js +20 -23
- package/lib/node/download/directory-archiver.spec.js.map +1 -1
- package/lib/node/download/file-download-backend-module.js +14 -16
- package/lib/node/download/file-download-backend-module.js.map +1 -1
- package/lib/node/download/file-download-cache.js +11 -15
- package/lib/node/download/file-download-cache.js.map +1 -1
- package/lib/node/download/file-download-endpoint.d.ts +1 -1
- package/lib/node/download/file-download-endpoint.d.ts.map +1 -1
- package/lib/node/download/file-download-endpoint.js +25 -31
- package/lib/node/download/file-download-endpoint.js.map +1 -1
- package/lib/node/download/file-download-handler.d.ts +2 -2
- package/lib/node/download/file-download-handler.d.ts.map +1 -1
- package/lib/node/download/file-download-handler.js +70 -76
- package/lib/node/download/file-download-handler.js.map +1 -1
- package/lib/node/download/test/mock-directory-archiver.d.ts +1 -1
- package/lib/node/download/test/mock-directory-archiver.d.ts.map +1 -1
- package/lib/node/download/test/mock-directory-archiver.js +2 -6
- package/lib/node/download/test/mock-directory-archiver.js.map +1 -1
- package/lib/node/file-change-collection.d.ts +1 -1
- package/lib/node/file-change-collection.d.ts.map +1 -1
- package/lib/node/file-change-collection.js +1 -5
- package/lib/node/file-change-collection.js.map +1 -1
- package/lib/node/file-change-collection.spec.js +5 -8
- package/lib/node/file-change-collection.spec.js.map +1 -1
- package/lib/node/filesystem-backend-module.d.ts +1 -1
- package/lib/node/filesystem-backend-module.d.ts.map +1 -1
- package/lib/node/filesystem-backend-module.js +60 -64
- package/lib/node/filesystem-backend-module.js.map +1 -1
- package/lib/node/filesystem-watcher-client.d.ts +2 -2
- package/lib/node/filesystem-watcher-client.d.ts.map +1 -1
- package/lib/node/filesystem-watcher-client.js +11 -16
- package/lib/node/filesystem-watcher-client.js.map +1 -1
- package/lib/node/filesystem-watcher-dispatcher.d.ts +1 -1
- package/lib/node/filesystem-watcher-dispatcher.d.ts.map +1 -1
- package/lib/node/filesystem-watcher-dispatcher.js +9 -13
- package/lib/node/filesystem-watcher-dispatcher.js.map +1 -1
- package/lib/node/filesystem-watcher-service-impl.d.ts +3 -3
- package/lib/node/filesystem-watcher-service-impl.d.ts.map +1 -1
- package/lib/node/filesystem-watcher-service-impl.js +7 -11
- package/lib/node/filesystem-watcher-service-impl.js.map +1 -1
- package/lib/node/filesystem-watcher-service-impl.spec.js +23 -26
- package/lib/node/filesystem-watcher-service-impl.spec.js.map +1 -1
- package/lib/node/filesystem-watcher.d.ts +1 -1
- package/lib/node/filesystem-watcher.d.ts.map +1 -1
- package/lib/node/filesystem-watcher.js +6 -11
- package/lib/node/filesystem-watcher.js.map +1 -1
- package/lib/node/nodejs-watcher/node-directory-watcher.d.ts +4 -4
- package/lib/node/nodejs-watcher/node-directory-watcher.d.ts.map +1 -1
- package/lib/node/nodejs-watcher/node-directory-watcher.js +20 -26
- package/lib/node/nodejs-watcher/node-directory-watcher.js.map +1 -1
- package/lib/node/nodejs-watcher/node-directory-watcher.spec.js +51 -54
- package/lib/node/nodejs-watcher/node-directory-watcher.spec.js.map +1 -1
- package/lib/node/nodejs-watcher/watch-request-router.d.ts +3 -3
- package/lib/node/nodejs-watcher/watch-request-router.d.ts.map +1 -1
- package/lib/node/nodejs-watcher/watch-request-router.js +8 -13
- package/lib/node/nodejs-watcher/watch-request-router.js.map +1 -1
- package/lib/node/nodejs-watcher/watcher-host.d.ts +1 -1
- package/lib/node/nodejs-watcher/watcher-host.d.ts.map +1 -1
- package/lib/node/nodejs-watcher/watcher-host.js +7 -12
- package/lib/node/nodejs-watcher/watcher-host.js.map +1 -1
- package/lib/node/parcel-watcher/index.js +6 -9
- package/lib/node/parcel-watcher/index.js.map +1 -1
- package/lib/node/parcel-watcher/parcel-filesystem-service.d.ts +4 -4
- package/lib/node/parcel-watcher/parcel-filesystem-service.d.ts.map +1 -1
- package/lib/node/parcel-watcher/parcel-filesystem-service.js +4 -8
- package/lib/node/parcel-watcher/parcel-filesystem-service.js.map +1 -1
- package/lib/node/parcel-watcher/parcel-filesystem-watcher.spec.js +23 -26
- package/lib/node/parcel-watcher/parcel-filesystem-watcher.spec.js.map +1 -1
- package/lib/node/parcel-watcher/parcel-options.js +1 -4
- package/lib/node/parcel-watcher/parcel-options.js.map +1 -1
- package/lib/node/parcel-watcher/parcel-watcher-exclude.spec.js +11 -16
- package/lib/node/parcel-watcher/parcel-watcher-exclude.spec.js.map +1 -1
- package/lib/node/parcel-watcher/parcel-watcher-retry.spec.js +11 -16
- package/lib/node/parcel-watcher/parcel-watcher-retry.spec.js.map +1 -1
- package/lib/node/parcel-watcher/parcel-watcher.d.ts +3 -3
- package/lib/node/parcel-watcher/parcel-watcher.d.ts.map +1 -1
- package/lib/node/parcel-watcher/parcel-watcher.js +28 -32
- package/lib/node/parcel-watcher/parcel-watcher.js.map +1 -1
- package/lib/node/test/watcher-test-helper.d.ts +1 -1
- package/lib/node/test/watcher-test-helper.d.ts.map +1 -1
- package/lib/node/test/watcher-test-helper.js +5 -10
- package/lib/node/test/watcher-test-helper.js.map +1 -1
- package/lib/node/upload/node-file-upload-service.d.ts +1 -1
- package/lib/node/upload/node-file-upload-service.d.ts.map +1 -1
- package/lib/node/upload/node-file-upload-service.js +20 -25
- package/lib/node/upload/node-file-upload-service.js.map +1 -1
- package/lib/node/upload/node-file-upload-service.spec.js +21 -24
- package/lib/node/upload/node-file-upload-service.spec.js.map +1 -1
- package/package.json +21 -5
- package/src/browser/breadcrumbs/filepath-breadcrumb.ts +1 -1
- package/src/browser/breadcrumbs/filepath-breadcrumbs-container.ts +1 -1
- package/src/browser/breadcrumbs/filepath-breadcrumbs-contribution.ts +5 -5
- package/src/browser/download/file-download-command-contribution.ts +1 -1
- package/src/browser/download/file-download-frontend-module.ts +3 -3
- package/src/browser/download/file-download-service.ts +1 -1
- package/src/browser/file-dialog/file-dialog-container.ts +5 -5
- package/src/browser/file-dialog/file-dialog-hidden-files-renderer.tsx +1 -1
- package/src/browser/file-dialog/file-dialog-model.ts +2 -2
- package/src/browser/file-dialog/file-dialog-module.ts +5 -5
- package/src/browser/file-dialog/file-dialog-service.ts +4 -4
- package/src/browser/file-dialog/file-dialog-tree-filters-renderer.spec.ts +2 -2
- package/src/browser/file-dialog/file-dialog-tree-filters-renderer.tsx +1 -1
- package/src/browser/file-dialog/file-dialog-tree.ts +2 -2
- package/src/browser/file-dialog/file-dialog-widget.ts +2 -2
- package/src/browser/file-dialog/file-dialog.ts +16 -13
- package/src/browser/file-dialog/index.ts +4 -4
- package/src/browser/file-resource.spec.ts +3 -3
- package/src/browser/file-resource.ts +3 -3
- package/src/browser/file-selection.ts +1 -1
- package/src/browser/file-service-activation.spec.ts +2 -2
- package/src/browser/file-service-copy.spec.ts +2 -2
- package/src/browser/file-service-watcher.spec.ts +2 -2
- package/src/browser/file-service.ts +6 -6
- package/src/browser/file-tree/file-tree-container.ts +3 -3
- package/src/browser/file-tree/file-tree-decorator-adapter.spec.ts +1 -1
- package/src/browser/file-tree/file-tree-decorator-adapter.ts +1 -1
- package/src/browser/file-tree/file-tree-label-provider.ts +1 -1
- package/src/browser/file-tree/file-tree-model.ts +12 -6
- package/src/browser/file-tree/file-tree-widget.tsx +8 -5
- package/src/browser/file-tree/file-tree.ts +3 -3
- package/src/browser/file-tree/index.ts +6 -6
- package/src/browser/filesystem-frontend-contribution.ts +6 -6
- package/src/browser/filesystem-frontend-module.ts +14 -14
- package/src/browser/filesystem-saveable-service.ts +2 -2
- package/src/browser/index.ts +4 -4
- package/src/browser/location/index.ts +2 -2
- package/src/browser/location/location-renderer.spec.ts +3 -3
- package/src/browser/location/location-renderer.tsx +3 -3
- package/src/browser/remote-file-service-contribution.ts +2 -2
- package/src/browser/upload/file-upload-service-impl.ts +5 -5
- package/src/browser/vscode-file-service-contribution.ts +2 -2
- package/src/browser-only/browser-only-filesystem-frontend-module.ts +7 -7
- package/src/browser-only/browser-only-filesystem-provider-server.ts +1 -1
- package/src/browser-only/download/file-download-command-contribution.ts +2 -2
- package/src/browser-only/download/file-download-frontend-module.ts +3 -3
- package/src/browser-only/download/file-download-service.ts +3 -3
- package/src/browser-only/file-search.ts +2 -1
- package/src/browser-only/opfs-filesystem-initialization.ts +1 -1
- package/src/browser-only/opfs-filesystem-provider.ts +3 -3
- package/src/browser-only/upload/file-upload-service-impl.ts +4 -4
- package/src/common/delegating-file-system-provider.ts +1 -1
- package/src/common/files.spec.ts +1 -1
- package/src/common/filesystem-utils.spec.ts +2 -2
- package/src/common/filesystem-utils.ts +1 -1
- package/src/common/filesystem-watcher-protocol.ts +1 -1
- package/src/common/index.ts +3 -3
- package/src/common/io.ts +2 -2
- package/src/common/remote-file-system-provider.ts +1 -1
- package/src/electron-browser/file-dialog/electron-file-dialog-module.ts +2 -2
- package/src/electron-browser/file-dialog/electron-file-dialog-service.spec.ts +30 -3
- package/src/electron-browser/file-dialog/electron-file-dialog-service.ts +8 -6
- package/src/electron-browser/preload.ts +1 -1
- package/src/electron-common/electron-api.ts +4 -0
- package/src/electron-main/electron-api-main.ts +7 -3
- package/src/electron-main/electron-main-module.ts +1 -1
- package/src/node/archive/archive-extractor.spec.ts +359 -0
- package/src/node/archive/archive-extractor.ts +350 -0
- package/src/node/archive/test/test-archives.ts +117 -0
- package/src/node/disk-file-system-provider.spec.ts +3 -3
- package/src/node/disk-file-system-provider.ts +7 -6
- package/src/node/download/directory-archiver.spec.ts +1 -1
- package/src/node/download/file-download-backend-module.ts +4 -4
- package/src/node/download/file-download-endpoint.ts +4 -3
- package/src/node/download/file-download-handler.ts +3 -3
- package/src/node/download/test/mock-directory-archiver.ts +1 -1
- package/src/node/file-change-collection.spec.ts +2 -2
- package/src/node/file-change-collection.ts +1 -1
- package/src/node/filesystem-backend-module.ts +15 -12
- package/src/node/filesystem-watcher-client.ts +2 -2
- package/src/node/filesystem-watcher-dispatcher.ts +1 -1
- package/src/node/filesystem-watcher-service-impl.spec.ts +5 -5
- package/src/node/filesystem-watcher-service-impl.ts +4 -4
- package/src/node/filesystem-watcher.ts +1 -1
- package/src/node/nodejs-watcher/node-directory-watcher.spec.ts +5 -5
- package/src/node/nodejs-watcher/node-directory-watcher.ts +5 -5
- package/src/node/nodejs-watcher/watch-request-router.ts +4 -4
- package/src/node/nodejs-watcher/watcher-host.ts +1 -1
- package/src/node/parcel-watcher/index.ts +2 -2
- package/src/node/parcel-watcher/parcel-filesystem-service.ts +4 -4
- package/src/node/parcel-watcher/parcel-filesystem-watcher.spec.ts +2 -2
- package/src/node/parcel-watcher/parcel-watcher-exclude.spec.ts +4 -8
- package/src/node/parcel-watcher/parcel-watcher-retry.spec.ts +4 -6
- package/src/node/parcel-watcher/parcel-watcher.ts +7 -6
- package/src/node/test/watcher-test-helper.ts +1 -1
- package/src/node/upload/node-file-upload-service.spec.ts +1 -1
- package/src/node/upload/node-file-upload-service.ts +6 -6
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// *****************************************************************************
|
|
3
2
|
// Copyright (C) 2022 EclipseSource and others.
|
|
4
3
|
//
|
|
@@ -14,364 +13,363 @@
|
|
|
14
13
|
//
|
|
15
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
15
|
// *****************************************************************************
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const filesystem_utils_1 = require("./filesystem-utils");
|
|
16
|
+
import { FileStat } from './files.js';
|
|
17
|
+
import { expect } from 'chai';
|
|
18
|
+
import { FileSystemUtils } from './filesystem-utils.js';
|
|
21
19
|
describe('generateUniqueResourceURI', () => {
|
|
22
20
|
describe('Target is file', () => {
|
|
23
21
|
describe('file without extension', () => {
|
|
24
22
|
it('appends index', () => {
|
|
25
|
-
const parent =
|
|
26
|
-
const source =
|
|
23
|
+
const parent = FileStat.dir('parent');
|
|
24
|
+
const source = FileStat.file('source');
|
|
27
25
|
parent.children = [source];
|
|
28
|
-
const result =
|
|
29
|
-
|
|
26
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
27
|
+
expect(result.path.base).to.eq('source 1');
|
|
30
28
|
});
|
|
31
29
|
it('appends first available index', () => {
|
|
32
|
-
const parent =
|
|
33
|
-
const source =
|
|
34
|
-
parent.children = [source,
|
|
35
|
-
const result =
|
|
36
|
-
|
|
30
|
+
const parent = FileStat.dir('parent');
|
|
31
|
+
const source = FileStat.file('source');
|
|
32
|
+
parent.children = [source, FileStat.file('source 1'), FileStat.file('source 3')];
|
|
33
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
34
|
+
expect(result.path.base).to.eq('source 2');
|
|
37
35
|
});
|
|
38
36
|
it('appends suffix', () => {
|
|
39
|
-
const parent =
|
|
40
|
-
const source =
|
|
37
|
+
const parent = FileStat.dir('parent');
|
|
38
|
+
const source = FileStat.file('source');
|
|
41
39
|
parent.children = [source];
|
|
42
|
-
const result =
|
|
43
|
-
|
|
40
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
41
|
+
expect(result.path.base).to.eq('source copy');
|
|
44
42
|
});
|
|
45
43
|
it('appends suffix and index', () => {
|
|
46
|
-
const parent =
|
|
47
|
-
const source =
|
|
48
|
-
parent.children = [source,
|
|
49
|
-
const result =
|
|
50
|
-
|
|
44
|
+
const parent = FileStat.dir('parent');
|
|
45
|
+
const source = FileStat.file('source');
|
|
46
|
+
parent.children = [source, FileStat.file('source copy')];
|
|
47
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
48
|
+
expect(result.path.base).to.eq('source copy 1');
|
|
51
49
|
});
|
|
52
50
|
it('appends suffix and first available index', () => {
|
|
53
|
-
const parent =
|
|
54
|
-
const source =
|
|
55
|
-
parent.children = [source,
|
|
56
|
-
const result =
|
|
57
|
-
|
|
51
|
+
const parent = FileStat.dir('parent');
|
|
52
|
+
const source = FileStat.file('source');
|
|
53
|
+
parent.children = [source, FileStat.file('source copy'), FileStat.file('source copy 1'), FileStat.file('source copy 3')];
|
|
54
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
55
|
+
expect(result.path.base).to.eq('source copy 2');
|
|
58
56
|
});
|
|
59
57
|
it('appends only index when source name already contains suffix', () => {
|
|
60
|
-
const parent =
|
|
61
|
-
const source =
|
|
62
|
-
parent.children = [
|
|
63
|
-
const result =
|
|
64
|
-
|
|
58
|
+
const parent = FileStat.dir('parent');
|
|
59
|
+
const source = FileStat.file('source copy 1');
|
|
60
|
+
parent.children = [FileStat.file('source'), source, FileStat.file('source copy 2'), FileStat.file('source copy 3')];
|
|
61
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
62
|
+
expect(result.path.base).to.eq('source copy 4');
|
|
65
63
|
});
|
|
66
64
|
});
|
|
67
65
|
describe('file with extension', () => {
|
|
68
66
|
it('appends index', () => {
|
|
69
|
-
const parent =
|
|
70
|
-
const source =
|
|
67
|
+
const parent = FileStat.dir('parent');
|
|
68
|
+
const source = FileStat.file('source.txt');
|
|
71
69
|
parent.children = [source];
|
|
72
|
-
const result =
|
|
73
|
-
|
|
70
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
71
|
+
expect(result.path.base).to.eq('source 1.txt');
|
|
74
72
|
});
|
|
75
73
|
it('appends first available index', () => {
|
|
76
|
-
const parent =
|
|
77
|
-
const source =
|
|
78
|
-
parent.children = [source,
|
|
79
|
-
const result =
|
|
80
|
-
|
|
74
|
+
const parent = FileStat.dir('parent');
|
|
75
|
+
const source = FileStat.file('source.txt');
|
|
76
|
+
parent.children = [source, FileStat.file('source 1.txt'), FileStat.file('source 3.txt')];
|
|
77
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
78
|
+
expect(result.path.base).to.eq('source 2.txt');
|
|
81
79
|
});
|
|
82
80
|
it('appends suffix', () => {
|
|
83
|
-
const parent =
|
|
84
|
-
const source =
|
|
81
|
+
const parent = FileStat.dir('parent');
|
|
82
|
+
const source = FileStat.file('source.txt');
|
|
85
83
|
parent.children = [source];
|
|
86
|
-
const result =
|
|
87
|
-
|
|
84
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
85
|
+
expect(result.path.base).to.eq('source copy.txt');
|
|
88
86
|
});
|
|
89
87
|
it('appends suffix and index', () => {
|
|
90
|
-
const parent =
|
|
91
|
-
const source =
|
|
92
|
-
parent.children = [source,
|
|
93
|
-
const result =
|
|
94
|
-
|
|
88
|
+
const parent = FileStat.dir('parent');
|
|
89
|
+
const source = FileStat.file('source.txt');
|
|
90
|
+
parent.children = [source, FileStat.file('source copy.txt')];
|
|
91
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
92
|
+
expect(result.path.base).to.eq('source copy 1.txt');
|
|
95
93
|
});
|
|
96
94
|
it('appends suffix and first available index', () => {
|
|
97
|
-
const parent =
|
|
98
|
-
const source =
|
|
99
|
-
parent.children = [source,
|
|
100
|
-
const result =
|
|
101
|
-
|
|
95
|
+
const parent = FileStat.dir('parent');
|
|
96
|
+
const source = FileStat.file('source.txt');
|
|
97
|
+
parent.children = [source, FileStat.file('source copy.txt'), FileStat.file('source copy 1.txt'), FileStat.file('source copy 3.txt')];
|
|
98
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
99
|
+
expect(result.path.base).to.eq('source copy 2.txt');
|
|
102
100
|
});
|
|
103
101
|
it('appends only index when source name already contains suffix', () => {
|
|
104
|
-
const parent =
|
|
105
|
-
const source =
|
|
106
|
-
parent.children = [
|
|
107
|
-
const result =
|
|
108
|
-
|
|
102
|
+
const parent = FileStat.dir('parent');
|
|
103
|
+
const source = FileStat.file('source copy 1.txt');
|
|
104
|
+
parent.children = [FileStat.file('source.txt'), source, FileStat.file('source copy 2.txt'), FileStat.file('source copy 3.txt')];
|
|
105
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
106
|
+
expect(result.path.base).to.eq('source copy 4.txt');
|
|
109
107
|
});
|
|
110
108
|
});
|
|
111
109
|
describe('dotfile without extension', () => {
|
|
112
110
|
it('appends index', () => {
|
|
113
|
-
const parent =
|
|
114
|
-
const source =
|
|
111
|
+
const parent = FileStat.dir('parent');
|
|
112
|
+
const source = FileStat.file('.source');
|
|
115
113
|
parent.children = [source];
|
|
116
|
-
const result =
|
|
117
|
-
|
|
114
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
115
|
+
expect(result.path.base).to.eq('.source 1');
|
|
118
116
|
});
|
|
119
117
|
it('appends first available index', () => {
|
|
120
|
-
const parent =
|
|
121
|
-
const source =
|
|
122
|
-
parent.children = [source,
|
|
123
|
-
const result =
|
|
124
|
-
|
|
118
|
+
const parent = FileStat.dir('parent');
|
|
119
|
+
const source = FileStat.file('.source');
|
|
120
|
+
parent.children = [source, FileStat.file('.source 1'), FileStat.file('.source 3')];
|
|
121
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
122
|
+
expect(result.path.base).to.eq('.source 2');
|
|
125
123
|
});
|
|
126
124
|
it('appends suffix', () => {
|
|
127
|
-
const parent =
|
|
128
|
-
const source =
|
|
125
|
+
const parent = FileStat.dir('parent');
|
|
126
|
+
const source = FileStat.file('.source');
|
|
129
127
|
parent.children = [source];
|
|
130
|
-
const result =
|
|
131
|
-
|
|
128
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
129
|
+
expect(result.path.base).to.eq('.source copy');
|
|
132
130
|
});
|
|
133
131
|
it('appends suffix and index', () => {
|
|
134
|
-
const parent =
|
|
135
|
-
const source =
|
|
136
|
-
parent.children = [source,
|
|
137
|
-
const result =
|
|
138
|
-
|
|
132
|
+
const parent = FileStat.dir('parent');
|
|
133
|
+
const source = FileStat.file('.source');
|
|
134
|
+
parent.children = [source, FileStat.file('.source copy')];
|
|
135
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
136
|
+
expect(result.path.base).to.eq('.source copy 1');
|
|
139
137
|
});
|
|
140
138
|
it('appends suffix and first available index', () => {
|
|
141
|
-
const parent =
|
|
142
|
-
const source =
|
|
143
|
-
parent.children = [source,
|
|
144
|
-
const result =
|
|
145
|
-
|
|
139
|
+
const parent = FileStat.dir('parent');
|
|
140
|
+
const source = FileStat.file('.source');
|
|
141
|
+
parent.children = [source, FileStat.file('.source copy'), FileStat.file('.source copy 1'), FileStat.file('.source copy 3')];
|
|
142
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
143
|
+
expect(result.path.base).to.eq('.source copy 2');
|
|
146
144
|
});
|
|
147
145
|
it('appends only index when source name already contains suffix', () => {
|
|
148
|
-
const parent =
|
|
149
|
-
const source =
|
|
150
|
-
parent.children = [
|
|
151
|
-
const result =
|
|
152
|
-
|
|
146
|
+
const parent = FileStat.dir('parent');
|
|
147
|
+
const source = FileStat.file('.source copy 1');
|
|
148
|
+
parent.children = [FileStat.file('.source'), source, FileStat.file('.source copy 2'), FileStat.file('.source copy 3')];
|
|
149
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
150
|
+
expect(result.path.base).to.eq('.source copy 4');
|
|
153
151
|
});
|
|
154
152
|
});
|
|
155
153
|
describe('dotfile with extension', () => {
|
|
156
154
|
it('appends index', () => {
|
|
157
|
-
const parent =
|
|
158
|
-
const source =
|
|
155
|
+
const parent = FileStat.dir('parent');
|
|
156
|
+
const source = FileStat.file('.source.txt');
|
|
159
157
|
parent.children = [source];
|
|
160
|
-
const result =
|
|
161
|
-
|
|
158
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
159
|
+
expect(result.path.base).to.eq('.source 1.txt');
|
|
162
160
|
});
|
|
163
161
|
it('appends first available index', () => {
|
|
164
|
-
const parent =
|
|
165
|
-
const source =
|
|
166
|
-
parent.children = [source,
|
|
167
|
-
const result =
|
|
168
|
-
|
|
162
|
+
const parent = FileStat.dir('parent');
|
|
163
|
+
const source = FileStat.file('.source.txt');
|
|
164
|
+
parent.children = [source, FileStat.file('.source 1.txt'), FileStat.file('.source 3.txt')];
|
|
165
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
166
|
+
expect(result.path.base).to.eq('.source 2.txt');
|
|
169
167
|
});
|
|
170
168
|
it('appends suffix', () => {
|
|
171
|
-
const parent =
|
|
172
|
-
const source =
|
|
169
|
+
const parent = FileStat.dir('parent');
|
|
170
|
+
const source = FileStat.file('.source.txt');
|
|
173
171
|
parent.children = [source];
|
|
174
|
-
const result =
|
|
175
|
-
|
|
172
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
173
|
+
expect(result.path.base).to.eq('.source copy.txt');
|
|
176
174
|
});
|
|
177
175
|
it('appends suffix and index', () => {
|
|
178
|
-
const parent =
|
|
179
|
-
const source =
|
|
180
|
-
parent.children = [source,
|
|
181
|
-
const result =
|
|
182
|
-
|
|
176
|
+
const parent = FileStat.dir('parent');
|
|
177
|
+
const source = FileStat.file('.source.txt');
|
|
178
|
+
parent.children = [source, FileStat.file('.source copy.txt')];
|
|
179
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
180
|
+
expect(result.path.base).to.eq('.source copy 1.txt');
|
|
183
181
|
});
|
|
184
182
|
it('appends suffix and first available index', () => {
|
|
185
|
-
const parent =
|
|
186
|
-
const source =
|
|
187
|
-
parent.children = [source,
|
|
188
|
-
const result =
|
|
189
|
-
|
|
183
|
+
const parent = FileStat.dir('parent');
|
|
184
|
+
const source = FileStat.file('.source.txt');
|
|
185
|
+
parent.children = [source, FileStat.file('.source copy.txt'), FileStat.file('.source copy 1.txt'), FileStat.file('.source copy 3.txt')];
|
|
186
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
187
|
+
expect(result.path.base).to.eq('.source copy 2.txt');
|
|
190
188
|
});
|
|
191
189
|
it('appends only index when source name already contains suffix', () => {
|
|
192
|
-
const parent =
|
|
193
|
-
const source =
|
|
194
|
-
parent.children = [
|
|
195
|
-
const result =
|
|
196
|
-
|
|
190
|
+
const parent = FileStat.dir('parent');
|
|
191
|
+
const source = FileStat.file('.source copy 1.txt');
|
|
192
|
+
parent.children = [FileStat.file('.source.txt'), source, FileStat.file('.source copy 2.txt'), FileStat.file('.source copy 3.txt')];
|
|
193
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
194
|
+
expect(result.path.base).to.eq('.source copy 4.txt');
|
|
197
195
|
});
|
|
198
196
|
});
|
|
199
197
|
});
|
|
200
198
|
describe('Target is directory', () => {
|
|
201
199
|
describe('directory with path without extension', () => {
|
|
202
200
|
it('appends index', () => {
|
|
203
|
-
const parent =
|
|
204
|
-
const source =
|
|
201
|
+
const parent = FileStat.dir('parent');
|
|
202
|
+
const source = FileStat.dir('source');
|
|
205
203
|
parent.children = [source];
|
|
206
|
-
const result =
|
|
207
|
-
|
|
204
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
205
|
+
expect(result.path.base).to.eq('source 1');
|
|
208
206
|
});
|
|
209
207
|
it('appends first available index', () => {
|
|
210
|
-
const parent =
|
|
211
|
-
const source =
|
|
212
|
-
parent.children = [source,
|
|
213
|
-
const result =
|
|
214
|
-
|
|
208
|
+
const parent = FileStat.dir('parent');
|
|
209
|
+
const source = FileStat.dir('source');
|
|
210
|
+
parent.children = [source, FileStat.dir('source 1'), FileStat.dir('source 3')];
|
|
211
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
212
|
+
expect(result.path.base).to.eq('source 2');
|
|
215
213
|
});
|
|
216
214
|
it('appends suffix', () => {
|
|
217
|
-
const parent =
|
|
218
|
-
const source =
|
|
215
|
+
const parent = FileStat.dir('parent');
|
|
216
|
+
const source = FileStat.dir('source');
|
|
219
217
|
parent.children = [source];
|
|
220
|
-
const result =
|
|
221
|
-
|
|
218
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
219
|
+
expect(result.path.base).to.eq('source copy');
|
|
222
220
|
});
|
|
223
221
|
it('appends suffix and index', () => {
|
|
224
|
-
const parent =
|
|
225
|
-
const source =
|
|
226
|
-
parent.children = [source,
|
|
227
|
-
const result =
|
|
228
|
-
|
|
222
|
+
const parent = FileStat.dir('parent');
|
|
223
|
+
const source = FileStat.dir('source');
|
|
224
|
+
parent.children = [source, FileStat.dir('source copy')];
|
|
225
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
226
|
+
expect(result.path.base).to.eq('source copy 1');
|
|
229
227
|
});
|
|
230
228
|
it('appends suffix and first available index', () => {
|
|
231
|
-
const parent =
|
|
232
|
-
const source =
|
|
233
|
-
parent.children = [source,
|
|
234
|
-
const result =
|
|
235
|
-
|
|
229
|
+
const parent = FileStat.dir('parent');
|
|
230
|
+
const source = FileStat.dir('source');
|
|
231
|
+
parent.children = [source, FileStat.dir('source copy'), FileStat.dir('source copy 1'), FileStat.dir('source copy 3')];
|
|
232
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
233
|
+
expect(result.path.base).to.eq('source copy 2');
|
|
236
234
|
});
|
|
237
235
|
it('appends only index when source name already contains suffix', () => {
|
|
238
|
-
const parent =
|
|
239
|
-
const source =
|
|
240
|
-
parent.children = [
|
|
241
|
-
const result =
|
|
242
|
-
|
|
236
|
+
const parent = FileStat.dir('parent');
|
|
237
|
+
const source = FileStat.dir('source copy 1');
|
|
238
|
+
parent.children = [FileStat.dir('source'), source, FileStat.dir('source copy 2'), FileStat.dir('source copy 3')];
|
|
239
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
240
|
+
expect(result.path.base).to.eq('source copy 4');
|
|
243
241
|
});
|
|
244
242
|
});
|
|
245
243
|
describe('directory with path with extension', () => {
|
|
246
244
|
it('appends index', () => {
|
|
247
|
-
const parent =
|
|
248
|
-
const source =
|
|
245
|
+
const parent = FileStat.dir('parent');
|
|
246
|
+
const source = FileStat.dir('source.test');
|
|
249
247
|
parent.children = [source];
|
|
250
|
-
const result =
|
|
251
|
-
|
|
248
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
249
|
+
expect(result.path.base).to.eq('source.test 1');
|
|
252
250
|
});
|
|
253
251
|
it('appends first available index', () => {
|
|
254
|
-
const parent =
|
|
255
|
-
const source =
|
|
256
|
-
parent.children = [source,
|
|
257
|
-
const result =
|
|
258
|
-
|
|
252
|
+
const parent = FileStat.dir('parent');
|
|
253
|
+
const source = FileStat.dir('source.test');
|
|
254
|
+
parent.children = [source, FileStat.dir('source.test 1'), FileStat.dir('source.test 3')];
|
|
255
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
256
|
+
expect(result.path.base).to.eq('source.test 2');
|
|
259
257
|
});
|
|
260
258
|
it('appends suffix', () => {
|
|
261
|
-
const parent =
|
|
262
|
-
const source =
|
|
259
|
+
const parent = FileStat.dir('parent');
|
|
260
|
+
const source = FileStat.dir('source.test');
|
|
263
261
|
parent.children = [source];
|
|
264
|
-
const result =
|
|
265
|
-
|
|
262
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
263
|
+
expect(result.path.base).to.eq('source.test copy');
|
|
266
264
|
});
|
|
267
265
|
it('appends suffix and index', () => {
|
|
268
|
-
const parent =
|
|
269
|
-
const source =
|
|
270
|
-
parent.children = [source,
|
|
271
|
-
const result =
|
|
272
|
-
|
|
266
|
+
const parent = FileStat.dir('parent');
|
|
267
|
+
const source = FileStat.dir('source.test');
|
|
268
|
+
parent.children = [source, FileStat.dir('source.test copy')];
|
|
269
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
270
|
+
expect(result.path.base).to.eq('source.test copy 1');
|
|
273
271
|
});
|
|
274
272
|
it('appends suffix and first available index', () => {
|
|
275
|
-
const parent =
|
|
276
|
-
const source =
|
|
277
|
-
parent.children = [source,
|
|
278
|
-
const result =
|
|
279
|
-
|
|
273
|
+
const parent = FileStat.dir('parent');
|
|
274
|
+
const source = FileStat.dir('source.test');
|
|
275
|
+
parent.children = [source, FileStat.dir('source.test copy'), FileStat.dir('source.test copy 1'), FileStat.dir('source.test copy 3')];
|
|
276
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
277
|
+
expect(result.path.base).to.eq('source.test copy 2');
|
|
280
278
|
});
|
|
281
279
|
it('appends only index when source name already contains suffix', () => {
|
|
282
|
-
const parent =
|
|
283
|
-
const source =
|
|
284
|
-
parent.children = [
|
|
285
|
-
const result =
|
|
286
|
-
|
|
280
|
+
const parent = FileStat.dir('parent');
|
|
281
|
+
const source = FileStat.dir('source.test copy 1');
|
|
282
|
+
parent.children = [FileStat.dir('source.test'), source, FileStat.dir('source.test copy 2'), FileStat.dir('source.test copy 3')];
|
|
283
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
284
|
+
expect(result.path.base).to.eq('source.test copy 4');
|
|
287
285
|
});
|
|
288
286
|
});
|
|
289
287
|
describe('name starts with . and has path without extension', () => {
|
|
290
288
|
it('appends index', () => {
|
|
291
|
-
const parent =
|
|
292
|
-
const source =
|
|
289
|
+
const parent = FileStat.dir('parent');
|
|
290
|
+
const source = FileStat.dir('.source');
|
|
293
291
|
parent.children = [source];
|
|
294
|
-
const result =
|
|
295
|
-
|
|
292
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
293
|
+
expect(result.path.base).to.eq('.source 1');
|
|
296
294
|
});
|
|
297
295
|
it('appends first available index', () => {
|
|
298
|
-
const parent =
|
|
299
|
-
const source =
|
|
300
|
-
parent.children = [source,
|
|
301
|
-
const result =
|
|
302
|
-
|
|
296
|
+
const parent = FileStat.dir('parent');
|
|
297
|
+
const source = FileStat.dir('.source');
|
|
298
|
+
parent.children = [source, FileStat.dir('.source 1'), FileStat.dir('.source 3')];
|
|
299
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
300
|
+
expect(result.path.base).to.eq('.source 2');
|
|
303
301
|
});
|
|
304
302
|
it('appends suffix', () => {
|
|
305
|
-
const parent =
|
|
306
|
-
const source =
|
|
303
|
+
const parent = FileStat.dir('parent');
|
|
304
|
+
const source = FileStat.dir('.source');
|
|
307
305
|
parent.children = [source];
|
|
308
|
-
const result =
|
|
309
|
-
|
|
306
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
307
|
+
expect(result.path.base).to.eq('.source copy');
|
|
310
308
|
});
|
|
311
309
|
it('appends suffix and index', () => {
|
|
312
|
-
const parent =
|
|
313
|
-
const source =
|
|
314
|
-
parent.children = [source,
|
|
315
|
-
const result =
|
|
316
|
-
|
|
310
|
+
const parent = FileStat.dir('parent');
|
|
311
|
+
const source = FileStat.dir('.source');
|
|
312
|
+
parent.children = [source, FileStat.dir('.source copy')];
|
|
313
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
314
|
+
expect(result.path.base).to.eq('.source copy 1');
|
|
317
315
|
});
|
|
318
316
|
it('appends suffix and first available index', () => {
|
|
319
|
-
const parent =
|
|
320
|
-
const source =
|
|
321
|
-
parent.children = [source,
|
|
322
|
-
const result =
|
|
323
|
-
|
|
317
|
+
const parent = FileStat.dir('parent');
|
|
318
|
+
const source = FileStat.dir('.source');
|
|
319
|
+
parent.children = [source, FileStat.dir('.source copy'), FileStat.dir('.source copy 1'), FileStat.dir('.source copy 3')];
|
|
320
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
321
|
+
expect(result.path.base).to.eq('.source copy 2');
|
|
324
322
|
});
|
|
325
323
|
it('appends only index when source name already contains suffix', () => {
|
|
326
|
-
const parent =
|
|
327
|
-
const source =
|
|
328
|
-
parent.children = [
|
|
329
|
-
const result =
|
|
330
|
-
|
|
324
|
+
const parent = FileStat.dir('parent');
|
|
325
|
+
const source = FileStat.dir('.source copy 1');
|
|
326
|
+
parent.children = [FileStat.dir('.source'), source, FileStat.dir('.source copy 2'), FileStat.dir('.source copy 3')];
|
|
327
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
328
|
+
expect(result.path.base).to.eq('.source copy 4');
|
|
331
329
|
});
|
|
332
330
|
});
|
|
333
331
|
describe('name starts with . and has path with extension', () => {
|
|
334
332
|
it('appends index', () => {
|
|
335
|
-
const parent =
|
|
336
|
-
const source =
|
|
333
|
+
const parent = FileStat.dir('parent');
|
|
334
|
+
const source = FileStat.dir('.source.test');
|
|
337
335
|
parent.children = [source];
|
|
338
|
-
const result =
|
|
339
|
-
|
|
336
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
337
|
+
expect(result.path.base).to.eq('.source.test 1');
|
|
340
338
|
});
|
|
341
339
|
it('appends first available index', () => {
|
|
342
|
-
const parent =
|
|
343
|
-
const source =
|
|
344
|
-
parent.children = [source,
|
|
345
|
-
const result =
|
|
346
|
-
|
|
340
|
+
const parent = FileStat.dir('parent');
|
|
341
|
+
const source = FileStat.dir('.source.test');
|
|
342
|
+
parent.children = [source, FileStat.dir('.source.test 1'), FileStat.dir('.source.test 3')];
|
|
343
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory);
|
|
344
|
+
expect(result.path.base).to.eq('.source.test 2');
|
|
347
345
|
});
|
|
348
346
|
it('appends suffix', () => {
|
|
349
|
-
const parent =
|
|
350
|
-
const source =
|
|
347
|
+
const parent = FileStat.dir('parent');
|
|
348
|
+
const source = FileStat.dir('.source.test');
|
|
351
349
|
parent.children = [source];
|
|
352
|
-
const result =
|
|
353
|
-
|
|
350
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
351
|
+
expect(result.path.base).to.eq('.source.test copy');
|
|
354
352
|
});
|
|
355
353
|
it('appends suffix and index', () => {
|
|
356
|
-
const parent =
|
|
357
|
-
const source =
|
|
358
|
-
parent.children = [source,
|
|
359
|
-
const result =
|
|
360
|
-
|
|
354
|
+
const parent = FileStat.dir('parent');
|
|
355
|
+
const source = FileStat.dir('.source.test');
|
|
356
|
+
parent.children = [source, FileStat.dir('.source.test copy')];
|
|
357
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
358
|
+
expect(result.path.base).to.eq('.source.test copy 1');
|
|
361
359
|
});
|
|
362
360
|
it('appends suffix and first available index', () => {
|
|
363
|
-
const parent =
|
|
364
|
-
const source =
|
|
365
|
-
parent.children = [source,
|
|
366
|
-
const result =
|
|
367
|
-
|
|
361
|
+
const parent = FileStat.dir('parent');
|
|
362
|
+
const source = FileStat.dir('.source.test');
|
|
363
|
+
parent.children = [source, FileStat.dir('.source.test copy'), FileStat.dir('.source.test copy 1'), FileStat.dir('.source.test copy 3')];
|
|
364
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
365
|
+
expect(result.path.base).to.eq('.source.test copy 2');
|
|
368
366
|
});
|
|
369
367
|
it('appends only index when source name already contains suffix', () => {
|
|
370
|
-
const parent =
|
|
371
|
-
const source =
|
|
372
|
-
parent.children = [
|
|
373
|
-
const result =
|
|
374
|
-
|
|
368
|
+
const parent = FileStat.dir('parent');
|
|
369
|
+
const source = FileStat.dir('.source.test copy 1');
|
|
370
|
+
parent.children = [FileStat.dir('.source.test'), source, FileStat.dir('.source.test copy 2'), FileStat.dir('.source.test copy 3')];
|
|
371
|
+
const result = FileSystemUtils.generateUniqueResourceURI(parent, source.resource, source.isDirectory, 'copy');
|
|
372
|
+
expect(result.path.base).to.eq('.source.test copy 4');
|
|
375
373
|
});
|
|
376
374
|
});
|
|
377
375
|
});
|