Skip to content

Initial APIs for FileSystem extensions#1470

Closed
swankjesse wants to merge 8 commits intomasterfrom
jwilson.0415.extensions
Closed

Initial APIs for FileSystem extensions#1470
swankjesse wants to merge 8 commits intomasterfrom
jwilson.0415.extensions

Conversation

@swankjesse
Copy link
Collaborator

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
Collaborator 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

@swankjesse swankjesse closed this May 28, 2025
@swankjesse swankjesse deleted the jwilson.0415.extensions branch May 28, 2025 02:35
@MohammedKHC
Copy link
Contributor

@swankjesse why is this closed?
It seems so good!

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

4 participants