Skip to content
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

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

swankjesse
Copy link
Member

Closes: #1466

Copy link
Member

@oldergod oldergod left a 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

Comment on lines 75 to 78
// 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) {
Copy link
Member

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 ?

Copy link
Member Author

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.

Comment on lines +385 to +386
* When [extensionType] is requested on the returned file system, it will return [extension],
* regardless of what is returned by this file system.
Copy link
Member

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 ?

Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extension mechanism for FileSystem
3 participants