Commit Graph

25 Commits

Author SHA1 Message Date
Rafał Harabień
30f3f96537 Improve code style using rustfmt 2018-06-28 18:13:07 +02:00
Rafał Harabień
892c3974d3 Move BufStream to fscommon crate (BREAKING CHANGE)
BufStream is universal and can be used with any filesystem so its place is
in different crate. Also moved Partition struct from examples to
fscommon::StreamSlice struct (please note constructor arguments has changed).
2018-06-16 17:57:29 +02:00
Rafał Harabień
5574c2af73 Simplify examples using new FileSystem struct definition 2018-06-13 23:26:13 +02:00
Rafał Harabień
2304b13ec4 Take immutable self reference in Dir methods
Dir methods do not change Dir object itself. They usually clone inner
stream so no change really happens self struct. Underlying partition is
modified but it does not have to affect API. For example see
std::fs::File::set_len. This change greatly simplifies rename API usage.
2018-06-12 00:07:30 +02:00
Rafał Harabień
3d29f66aba Avoid using unwrap() in examples
New examples require Rust 1.26 because of returning error from main() function.
2018-05-31 21:40:40 +02:00
Rafał Harabień
1ecc9293a2 Add example for accessing disk partition 2018-05-17 18:31:33 +02:00
Rafał Harabień
e9dec65318 Fix warnings in Rust 1.25 2018-05-09 15:34:00 +02:00
Rafał Harabień
cecc35033a Add write example. 2017-11-08 20:40:36 +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ń
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ł 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ń
a1a2ffc2af Remove unneeded Fat prefix for most structures. 2017-10-07 14:56:50 +02:00
Rafał Harabień
d97ab1d1e1 Rename crate to fatfs and add more info to Cargo.toml. 2017-10-06 17:00:38 +02:00
Rafał Harabień
b604b19bde Make chrono crate dependency optional. 2017-10-06 16:42:29 +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ń
d88850624a Remove FatDir::list() method.
Vec can be created by using Iterator trait.
2017-10-01 18:45:58 +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
Rafał Harabień
2158c712e1 Add cat and ls examples. 2017-09-24 14:34:23 +02:00
Rafał Harabień
df2852351b Rename crate to rfat. 2017-09-24 03:13:50 +02:00
Rafał Harabień
e44d7fc6c2 Fix reading FAT32 root dir. 2017-09-23 21:53:32 +02:00
Rafał Harabień
8df86d24ef Add new test images and script for generating them - tests fail. 2017-09-23 21:24:34 +02:00
Rafał Harabień
88fd442dac Refactor code to use shared state.
This way for example FatFile can implement Read trait.
2017-09-23 19:42:09 +02:00
Rafał Harabień
65936f8f27 Restructure into proper crate. 2017-09-22 23:20:06 +02:00