New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode.FileSystemProvider API feedback #48527
Comments
Will add my comments here as well:
/**
* Subscribe to events in the file or folder denoted by `uri`.
* @param uri
* @param options
*/
watch(uri: Uri, options: { recursive?: boolean; excludes?: string[] }): Disposable; We should document
✅ 3. FileOptions have a
✅ 8. Do we need more
|
Some general change notice: Based on @dbaeumer's feedback and discussion I have removed cancelation-tokens (we can still add them later). Based @alexandrudima feedback I have removed most kitchen-sink-who-knows-what-comes-options because we can only ever use them to relax an operation. Not having tokens (that block the last argument-position) makes it nicer to eventually add them back. |
Fixed, now only |
Marking as verified. Joh and I went over the API yesterday again in a review session. |
Testing #48412
Grouping all of these suggestions in one item to make it easier to talk about them:
✅ 1. typo
FileSystemProvider2
=>FileSystemProvider
✅ 2. arguments passed in (even via options) should perhaps not have optionals.
stat
options as possible now. Some ideas:isFile
,isDirectory
orisSymbolicLink
) is always mandatoryfollowSymlinks
includeSize
includeModifiedTime
includeCreationTime
(see below)✅ 4. Perhaps enlarge the stat already with creation time. What else are we missing from e.g. node's stat ?
readDirectory
should take in the exact same stat options as a sub-option. In fact, all of the methods that return a stat should take perhaps as a sub-option the options that can be passed into stat.✅ 6. It is not clear if
createDirectory
should be recursive or not (for missing intermediate directories).Same for
writeFile
.✅ 7. It is not clear if
delete
should delete recursively.✅ 8. Comment is inconsistent (remove "from the underlying storage" or add it everywhere...)
// Delete a file or folder from the underlying storage.
✅ 9. Parameter naming, use
source
anddestination
or something.✅ 10. What is a
FileError.EntryNotFound
error ?✅ 11. Another typo
FileType2
:createDirectory
return a stat andwriteFile
does not?✅13. Should
delete
throw if the file or directory to be deleted is not found ?✅14. Should
rename
throw if the source is not found or if the target exists? Should it overwrite the target ? Same question aboutcopy
.The text was updated successfully, but these errors were encountered: