You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To migrate from node fs module to vscode File System API we will have to change following things Documentation
Structure change
initially we are using the normal file system used in os for eg . Path type : C:\Users\...\hardhat\contracts\greeter.sol would change to vscode.URI type file://Users\...\hardhat\contracts\greeter.sol so initiall we woild want to change path type to vscode.URI
All the function that are available in fs module are not exactly available in vscode File System API thus we would have to rewrite the function where ever there is a use of fs module in ethcode , but as per my observation we have all the required api for our current need
We can observe changes in code base by following examples
if we read a file using normal fs module it would work like this
We are not sure that how much role does fs module play in terms of performance and how better is it going to be if we use vscode File System API
Right now ethcode extension is working fine with this fs module
If we plan to migrate or standardise vscode File System API for file related operation in ethcode we should make sure that further whatever development are should be made in vscode File System API and gradually migrate previous code base to the same
we have been using native
fs
in multiple places like -We should be using vscode file system API instead whereever possible.
The text was updated successfully, but these errors were encountered: