-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Initial APIs for FileSystem extensions #1470
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the APIs
// If this file system is already an extension wrapper, replace it rather than wrapping again. | ||
// Note that this optimization doesn't apply to ForwardingFileSystem subclasses, only to the | ||
// ForwardingFileSystem base class. | ||
if (this::class === ForwardingFileSystem::class) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why we don't want to, or cannot support subclasses with this is ForwardingFileSystem
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This coalesces two ForwardingFileSystem wrappers into one. But it only works if there’s no other methods overridden in the ForwardingFileSystem. If there are, then we shouldn’t replace the users’ subtype with the base type.
* When [extensionType] is requested on the returned file system, it will return [extension], | ||
* regardless of what is returned by this file system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you can shadow extensions ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I sas the overrideExtension
test
Closes: #1466