Commit Graph

18 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ń
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ń
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ń
18b9d8c285 Do not panic if unexpected file type is found during path traversal
For example if in the middle of the path a file is found.
Return error in such case instead of panicking.
2018-06-07 23:26:11 +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ń
9f5f070955 Allow opening files/dirs using short name 2018-05-31 00:23:32 +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ń
3c52f35f6d Update dependencies 2018-05-09 15:34:05 +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ń
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ń
da76625759 Replace commented out logging by log crate usage. 2017-10-15 00:55:19 +02:00
Rafał Harabień
0c6e9aec5b Fix multiple corner cases and simplify code. 2017-10-10 16:05:19 +02:00
Rafał Harabień
13dd50bf61 Simplify BufStream implementation and use it in write test. 2017-10-10 14:48:57 +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