Skip to content

Conversation

@userzhy
Copy link
Contributor

@userzhy userzhy commented Dec 20, 2025

Which issue does this PR close?

Closes #7066.

Rationale for this change

The recently-added URI feature uses OpenDAL's existing idea of a scheme, which in most cases matches the commonly-used schemes for different services. However, the filesystem service uses the scheme fs, while standard file system URIs use the scheme file. This is confusing for users who expect to use file:// URIs.

By adding file as an alias for fs, users can use the standard URI scheme while maintaining backward compatibility with the existing fs scheme.

Note: I noticed @clbarnes indicated willingness to contribute on this issue. If you're already working on this, please let me know and I'm happy to close this PR.

What changes are included in this PR?

  • Added FILE_SCHEME constant ("file") in core/services/fs/src/lib.rs
  • Registered file as an alias for Fs service in the operator registry
  • Added a test case to verify file:// URIs work correctly

Are there any user-facing changes?

Yes. Users can now use the standard file:// URI scheme to create filesystem operators, in addition to the existing fs:// scheme. This is fully backward compatible.

// Both of these now work:
let op1 = Operator::from_uri("fs:///tmp/data")?;
let op2 = Operator::from_uri("file:///tmp/data")?;

AI Usage Statement

This PR was developed with the assistance of Claude (Anthropic).

@userzhy userzhy requested a review from Xuanwo as a code owner December 20, 2025 06:40
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels Dec 20, 2025
@clbarnes
Copy link
Contributor

I hadn't started work on it so you're good to go! Thank you ♥️

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 20, 2025
@Xuanwo
Copy link
Member

Xuanwo commented Dec 20, 2025

Thank you for working on this!

@Xuanwo Xuanwo merged commit d15b321 into apache:main Dec 20, 2025
325 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new feature: fs scheme should have an alias file

3 participants