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

Move path constants to proper fs crates #11

Open
kirillt opened this issue Mar 11, 2024 · 1 comment
Open

Move path constants to proper fs crates #11

kirillt opened this issue Mar 11, 2024 · 1 comment

Comments

@kirillt
Copy link
Member

kirillt commented Mar 11, 2024

We have multiple "path constants" defined in the fs-storage crate:
https://github.com/ARK-Builders/ark-rust/blob/main/fs-storage/src/lib.rs

However, none of them belong to this crate:

  • ARK_FOLDER = ".ark"

    • The most generic constant necessary for any fs crates, all apps which persist something on disk using fs crates will use this constant to locate the folder with internal app data. What about fs-core? Would we have other definitions in fs-core?
  • TAG_STORAGE_FILE = "user/tags", SCORE_STORAGE_FILE = "user/scores" and PROPERTIES_STORAGE_FOLDER = "user/properties"

    • Denote specific storages for user-defined metadata (should not be lost if possible, and we cannot restore the data). These constants must be defined in fs-tags, fs-scores and fs-properties.
  • STATS_FOLDER = "stats" and FAVORITES_FILE = "favorites"

    • Denote specific storages enhancing user experience (should not be lost if possible, but we can restore the data). These constants must be defined in fs-tags-stats and fs-favorites.
  • METADATA_STORAGE_FOLDER = "cache/metadata", PREVIEWS_STORAGE_FOLDER = "cache/previews" and THUMBNAILS_STORAGE_FOLDER = "cache/thumbnails"

    • Denote storages for generated data, or caches. We always can rebuild these storages from scratch. We need crates fs-metadata, fs-previews or fs-thumbnails to expose these constants.
  • INDEX_PATH = "index"

    • Denotes location for the index, similar to caches we can build it from scratch, it would only cost us some time. Must be defined in fs-index.
@kirillt
Copy link
Member Author

kirillt commented Mar 11, 2024

TL;DR
Crates:

  • fs-core?
  • fs-index
  • fs-favorites
  • fs-metadata
  • fs-previews or fs-thumbnails
  • fs-tags, do we need separate fs-tags-stats?
  • fs-scores
  • fs-properties

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

No branches or pull requests

1 participant