Workspace Explorer#1874
Conversation
This reverts commit 2d4058e.
This reverts commit a51cdf1.
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
| throw FileSystemError.FileNotFound(uri); | ||
| } | ||
|
|
||
| await parentEntity.createFile(posix.basename(uri.path), content, true); |
There was a problem hiding this comment.
should we use options.overwrite here instead of hard-coding true?
| type: isDir ? FileType.Directory : FileType.File, | ||
| ctime: entity.details.created_at ?? 0, | ||
| mtime: entity.details.modified_at ?? 0, | ||
| size: 0, |
There was a problem hiding this comment.
is it possible to use an actual file size here as reported by the workspace?
| return { | ||
| type: isDir ? FileType.Directory : FileType.File, | ||
| ctime: entity.details.created_at ?? 0, | ||
| mtime: entity.details.modified_at ?? 0, |
There was a problem hiding this comment.
how likely is it that we would default here? i don't think there is a good default that is not breaking the editor heuristics here, but you could consider using Date.now() instead of 0
| const contentBytes = await workspace.fs.readFile(srcUri); | ||
|
|
||
| try { | ||
| await root.createFile(fileName, contentBytes, true); |
There was a problem hiding this comment.
shall we prompt for overwrite instead of defaulting to overwriting? If a user uploads a file into a folder that already has a file with the same name, the remote file is destroyed without warning.
| async readContent(): Promise<Uint8Array> { | ||
| const result = await this._workspaceFsService.export({ | ||
| path: this.path, | ||
| format: "AUTO", |
There was a problem hiding this comment.
i am curious how it works with notebooks files. i believe this would return a source code file without an extension (.ipynb) - could you please double check?
| ), | ||
| contextValue: "wsfs.notebook", | ||
| command: { | ||
| command: "databricks.wsfs.openInBrowser", |
There was a problem hiding this comment.
is it expected that we are opening notebooks in a web browser instead of in the code editor in vscode?
Changes
Tests
Manually