Rafał Harabień
4f08acf4ab
Do not mount volume if fs_version field in BPB is not zero
2018-06-17 16:34:08 +02:00
Rafał Harabień
8a5491a919
Doc improvements
2018-06-17 16:27:59 +02:00
Rafał Harabień
11a39fdaae
Improve/fix API docs
2018-06-16 18:35:56 +02:00
Rafał Harabień
217b6046f1
Make disk object type generic (breaking change)
...
This change allows for moving an object ownership to FileSystem object
instead of borrowing it. It makes usage of library easier in some cases.
Unfortunately it is a breaking change.
2018-06-13 23:24:08 +02:00
Rafał Harabień
ccb205c906
Ignore free_cluster_count in FSInfo sector if volume has dirty flag
2018-06-07 22:54:35 +02:00
Rafał Harabień
1656540eac
Simplify code by using Self in return type
2018-06-06 17:16:32 +02:00
Rafał Harabień
75a6c32360
Add derived traits for FsStatusFlags and add Eq for some structs
2018-06-06 14:29:38 +02:00
Rafał Harabień
85c48d6aec
Make FsStatusFlags struct fields non-public and add getters
...
This way new fields can be added later without losing backward compatibility.
2018-06-06 14:17:05 +02:00
Rafał Harabień
0b5b04aca6
Make FileSystemStats struct fields non-public and add getters
...
This way new fields can be added later without losing backward compatibility.
2018-06-06 14:01:19 +02:00
Rafał Harabień
242e650626
Reduce number of pub(crate) attributes
2018-06-03 16:44:12 +02:00
Rafał Harabień
a83115dd45
Update FSInfo sector by default (if it is dirty)
2018-05-31 21:39:17 +02:00
Rafał Harabień
b4be13823c
Cache free clusters count
2018-05-28 00:03:42 +02:00
Rafał Harabień
945612f042
Do not write FSInfo sector if nothing changed.
2018-05-27 23:56:38 +02:00
Rafał Harabień
147b31fdcd
Update FSInfo sector on unmount/drop
2018-05-27 23:48:38 +02:00
Rafał Harabień
908ab61ee5
Update number of free clusters when allocating and freeing
2018-05-27 23:31:40 +02:00
Rafał Harabień
7709f5e6f6
Add FileSystem::stats method
...
It allows to get number of total and free clusters on FAT volume.
2018-05-26 17:09:13 +02:00
Rafał Harabień
9129816893
Speed up allocation by tracking last allocated cluster
2018-05-26 14:36:38 +02:00
Rafał Harabień
d094fd5d1d
Support checking entire FAT table when hint points in the middle of it
2018-05-12 23:38:56 +02:00
Rafał Harabień
4793d20977
Read FSInfo sector on mount and use it during cluster allocation
2018-05-12 23:17:45 +02:00
Rafał Harabień
35d03daae9
Support no_std without alloc
2018-05-10 15:00:59 +02:00
Rafał Harabień
11b2a3b956
Basic no_std support
2018-05-10 01:00:24 +02:00
Rafał Harabień
429864a69f
Clarify that seeked filesystem is not handled by library
2018-05-09 15:34:41 +02:00
Rafał Harabień
e9dec65318
Fix warnings in Rust 1.25
2018-05-09 15:34:00 +02:00
Rafał Harabień
8bb24994e0
Add read_status_flags API for getting dirty and IO error volume flags.
2017-12-01 17:24:02 +01:00
Rafał Harabień
d5c37f2af5
Introduce FsOptions struct for providing options for library.
...
Old read_only flag in FileSystem::new was misleading.
2017-11-08 20:26:50 +01:00
Rafał Harabień
8a8ee3c51a
Ignore volume ID and label if signature is not valid.
2017-11-08 20:03:21 +01:00
Rafał Harabień
5c0ad0ce18
More code refactoring.
2017-11-08 19:59:03 +01:00
Rafał Harabień
681ee56cb3
Keep only BPB in FileSystem struct instead of entire BootRecord.
2017-11-08 19:41:05 +01:00
Rafał Harabień
b38ea78f3e
Add automatic update of timestamps (created, accessed, modified).
...
Works only if chrono feature is enabled (default).
2017-11-08 00:18:31 +01:00
Rafał
529d717e30
Add .editorconfig file and fix whitespaces in existing files. ( #4 )
2017-10-25 17:20:27 +02:00
Rafał Harabień
9d3780f859
Update README and add more doc comments.
2017-10-21 16:25:04 +02:00
Rafał Harabień
2a61b0d175
Small code improvements.
2017-10-21 15:51:19 +02:00
Rafał Harabień
98ec30589a
Add some sanity checks and fix possible issues with partial read when not using read_exact.
2017-10-10 23:19:44 +02:00
Rafał Harabień
d52b0918ca
Support FAT mirroring.
2017-10-10 23:18:32 +02:00
Rafał Harabień
d8eba51b88
Alloc and free clusters for file data.
2017-10-09 21:14:28 +02:00
Rafał Harabień
f32f1c7279
Basic write support for files.
...
No cluster management yet.
Also BufStream is broken when writing.
2017-10-09 14:59:52 +02:00
Rafał Harabień
37f52e4024
Fix warnings.
2017-10-07 16:45:11 +02:00
Rafał Harabień
120c9b035c
Rename DirReader to DirRawStream.
2017-10-07 15:00:27 +02:00
Rafał Harabień
a1a2ffc2af
Remove unneeded Fat prefix for most structures.
2017-10-07 14:56:50 +02:00
Rafał Harabień
beb463ba3f
Fix possible panics if cluster chain ends before EOF.
2017-10-07 02:37:29 +02:00
Rafał Harabień
3e08c80fb0
Dont assume cluster iterator always succeeds.
2017-10-07 02:19:19 +02:00
Rafał Harabień
a7ca474a2f
Add FatDir::iter() method returning dir entries iterator.
...
FatDir is no longer iterator. Change allows to iterate over directory and still be able to use it.
2017-10-06 16:07:11 +02:00
Rafał Harabień
bfa4984ae3
Use lossy conversion for UTF-8/16 strings instead of panicking.
2017-10-06 15:51:01 +02:00
Rafał Harabień
bc835d59b5
Don't use boxed buffer in FAT cluster reading code.
...
I assume gived Read object is capable of basic buffering and caching.
2017-10-04 13:56:44 +02:00
Rafał Harabień
94dfe7ffd5
Remove exfat references.
...
exfat is very different from fat12/16/32 and wont be supported.
2017-10-01 21:39:11 +02:00
Rafał Harabień
284d26282c
Rename some fields in internal bsp struct.
2017-10-01 18:13:59 +02:00
Rafał Harabień
c8ccd7d86e
Don't use dynamic allocation for FAT table wrapper.
...
FAT table still uses Box but its hardly avoidable when reading entire FAT into memory.
2017-09-28 00:11:24 +02:00
Rafał Harabień
cb6d486e86
Fix warning.
2017-09-27 14:20:52 +02:00
Rafał Harabień
4feeb3eead
Use references instead of Rc for shared state.
2017-09-27 14:05:58 +02:00
Rafał Harabień
840290f754
Add LFN support and rename some functions.
2017-09-24 22:12:38 +02:00