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

fix(fs): normalize file manager API: distinguishing read,write,create #1268

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

zipper-meng
Copy link
Member

@zipper-meng zipper-meng commented Jun 14, 2023

Which issue does this PR close?

Related #.

Rationale for this change

I thought methods in FileManager has something wrong.

  • open_file also create the file if not exists.
  • Some Error instanced too early.

What changes are included in this PR?

  1. Methods in file manager has it's own function:
    • open_file: Open a file to read.
    • create_file: Open or create a file to read & write, overwrite if exists.
    • open_create_file: Open or create a file to read & write, append if exists.
  2. Some unit test doesn't clean it's directory since last run.
    • change remote_dir() to remove_dir_all().

Are there any user-facing changes?

@zipper-meng zipper-meng force-pushed the feature/read branch 2 times, most recently from 3a0d735 to 2396a8d Compare June 14, 2023 05:57
@zipper-meng zipper-meng marked this pull request as ready for review June 20, 2023 06:13
@zipper-meng zipper-meng merged commit 33f49b7 into cnosdb:main Jun 20, 2023
@zipper-meng zipper-meng deleted the feature/read branch August 21, 2023 03:24
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.

2 participants