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
Currently, File is a wrapper for a path, position, and any changed data. I think it would make sense to consolidate the internal functionality on FileSystem, then to provide a mechanism for syncing. I'm currently thinking of these changes:
Change FileSystem#sync to only handle synchronizing, not updating data (breaking)
This would also need some tweaking of the Readonly mixin.
Add a new method to FileSystem for updating metadata/stats
Move File into the VFS (breaking)
Remove the openFile method of FileSystem (breaking)
Rework the createFile method of FileSystem to not return a File— maybe Stats instead (breaking)
For the most part, this would make things much easier to maintain.
The non-breaking changes that can be done before 2.0:
The new FileSystem method (2)
The functionality for sync-only sync (1)
Deprecate old code paths
Rewrite the relevant parts of the VFS to use the new code paths
Other than that, a breaking 2.0 release is needed.
I'm creating this discussion to get community feedback on this, please let me know if you have any questions or concerns!
enhancementNew feature or requestbreakingThis issue or pull request involves a breaking change
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently,
File
is a wrapper for apath
,position
, and any changed data. I think it would make sense to consolidate the internal functionality onFileSystem
, then to provide a mechanism for syncing. I'm currently thinking of these changes:FileSystem#sync
to only handle synchronizing, not updating data (breaking)Readonly
mixin.FileSystem
for updating metadata/statsFile
into the VFS (breaking)openFile
method ofFileSystem
(breaking)createFile
method ofFileSystem
to not return aFile
— maybeStats
instead (breaking)For the most part, this would make things much easier to maintain.
The non-breaking changes that can be done before 2.0:
FileSystem
method (2)sync
(1)Other than that, a breaking 2.0 release is needed.
I'm creating this discussion to get community feedback on this, please let me know if you have any questions or concerns!
Beta Was this translation helpful? Give feedback.
All reactions