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

[sync] Abstract storage API to access storage #247

Open
radumarias opened this issue Dec 4, 2024 · 0 comments
Open

[sync] Abstract storage API to access storage #247

radumarias opened this issue Dec 4, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@radumarias
Copy link
Member

Have an abstract layer to interact with the filesystem in EncryptedFs. This helps us have several implementations for desktop, WASM, and mobile that handle the particularities of each platform.

Abstractization layer for API similar to https://doc.rust-lang.org/std/fs/struct.File.html , https://doc.rust-lang.org/stable/std/fs/ and https://doc.rust-lang.org/stable/std/io/ and implementation that uses the above ones for accessing local FS. Use that impl in EncryptedFs struct and crypto modules to access FS.

Structure of crypto module

crypto::storage::sync::fs::OpenOptions
crypto::storage::sync::fs::File
crypto::storage::sync::fs
crypto::storage::sync::io
crypto::storage::sync::path::Path](https://doc.rust-lang.org/stable/std/path/struct.Path.html). This is because the existing method uses local fs
crypto::storage::sync::path::PathBuf. This is because the existing method uses local fs

We will have smth similar to how this is atomic Write to a File https://crates.io/crates/atomic-write-file

Flow is like this

lib-users > crypto::[fs, fs::OpenOptions, fs::File, io] > EncryptedFs -> crypto::storage::sync::[fs, fs::OpenOptions, fs::File, io]

This issue corresponds to encrypted_storage::sync::[fs, fs::File, io].

Screenshot from 2024-09-22 18-06-49

https://github.com/radumarias/rencfs/issues/111

@radumarias radumarias added the good first issue Good for newcomers label Dec 4, 2024
@radumarias radumarias added this to rencfs Dec 4, 2024
@radumarias radumarias moved this to Todo in rencfs Dec 4, 2024
@radumarias radumarias changed the title [sync] Abstract storage API to access local fs storage #111 [sync] Abstract storage API to access local fs storage Dec 8, 2024
@radumarias radumarias changed the title [sync] Abstract storage API to access local fs storage [sync] Abstract storage API to access storage Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant