-
Notifications
You must be signed in to change notification settings - Fork 45
Add random file access support #36
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
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR! It looks like I'll try to take a deeper look tomorrow! |
Good catch w.r.t the tests; I'll patch that up! (Originally published at: https://jacky.wtf/2022/7/rJ3S) |
src/filesystem.rs
Outdated
/// | ||
/// This is, by default, a no-op. | ||
fn sync(&self, _path: &str) -> VfsResult<()> { | ||
Ok(()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering what the default should be if the filesystem does not support sync...
Return OK from sync while not actually doing anything might lead to data loss, which I'd rather avoid.
It might be better to not provide a default impl and leave it up to the actual implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree!
src/filesystem.rs
Outdated
@@ -47,6 +45,32 @@ pub trait FileSystem: Debug + Sync + Send + 'static { | |||
fn move_dir(&self, _src: &str, _dest: &str) -> VfsResult<()> { | |||
Err(VfsError::NotSupported) | |||
} | |||
|
|||
/// Informs the filesystem to 'flush' its potentially cached information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doc comment is probably a copy/paste error ;-)
It looks the error changes I just merged caused a merge conflict, could you resolve that? Sorry for the extra work! |
I can! Apologies for the delay! (Originally published at: https://jacky.wtf/2022/8/Hn2a) |
In order to confirm R/W access, allowing a path to report if it can be written to or if it's only read-only helps.
8e65046
to
9863827
Compare
Thanks for the update! It looks the CI build is still failing, and there seem to be some formatting issues. Quick note - I'm currently on vacation, might be slow to respond the next week or so. |
Hi again, just wanted to check in. Are you still working on this? |
Hey! I am, just got caught up with some life stuff that's forced me to focus on it. But I am still focused on landing this! (Originally published at: https://jacky.wtf/2022/9/N-45) |
Will close #35 by providing a light implementation of seekable file support