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

The Read and Write Function of the File Structure Only Reads or Writes the Current Cluster #96

Open
zzjrabbit opened this issue Jul 21, 2024 · 1 comment

Comments

@zzjrabbit
Copy link

Hi! Thanks to this great crate, my OS supported FAT32 file system in 1 day. But today, when I was trying to read a user program from the disk, I found out that the read function of the file structure only reads the current cluster. Then I read the source code, and I also found out that the write function does the same thing. It only writes the current cluster. I thought that my builder program uses this crate as well, but it works pretty good. I checked it. Then I found the reason. It uses the core::io::copy function. To read my user program from my disk, I had to seek every time I read a cluster. It's so cumbersome. Could you please fix this bug?

@zzjrabbit zzjrabbit changed the title The Read and Write Function of the File Structure Only Reads the Current Cluster The Read and Write Function of the File Structure Only Reads or Writes the Current Cluster Jul 21, 2024
@rafalh
Copy link
Owner

rafalh commented Jul 29, 2024

Are you talking about the necessity to seek to the beginning of a partition before opening a filesystem (FileSystem::new)? If not could you provide an example code that demonstrates the problem?

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

2 participants