Rafał Harabień
1724a54536
Fix formatting
...
Immprovements by hand + rustfmt
2018-10-10 21:26:31 +02:00
Rafał Harabień
5dea8b5f8a
Test dirty flags on all FAT variants
...
Flags field offset is different is it makes sense.
2018-06-29 15:38:27 +02:00
Rafał Harabień
dc1ad7d2f7
Mark volume dirty on first write and not-dirty on unmount
2018-06-29 15:35:37 +02:00
Rafał Harabień
30f3f96537
Improve code style using rustfmt
2018-06-28 18:13:07 +02:00
Rafał Harabień
8995a43bc4
Allow renaming to the same name
2018-06-17 22:26:07 +02:00
Rafał Harabień
8c1dae9f0c
Do not remove source file in Dir::rename if destination already exists
...
Previous code removed source file before returning an error.
It also caused a clusters leak. Now it returns error before doing any
modifications on the partition.
2018-06-17 22:25:22 +02:00
Rafał Harabień
674d1f8182
Fix failing in Dir::create_file/dir if existing destination entry has wrong type
2018-06-17 21:46:54 +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ń
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ń
66c976bc3b
Add method for renaming/moving a file
2018-06-06 13:56:59 +02:00
Rafał Harabień
282c40fad2
Implement proper short-name generation
2018-05-30 17:43:18 +02:00
Rafał Harabień
147b31fdcd
Update FSInfo sector on unmount/drop
2018-05-27 23:48:38 +02:00
Rafał Harabień
3c52f35f6d
Update dependencies
2018-05-09 15:34:05 +02: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ń
cdde3ca468
When generating short name replace invalid characters with '?'.
2017-11-08 00:07:06 +01:00
Rafał Harabień
21bd2a0e8d
Zero new directory clusters after allocation.
2017-10-27 15:03:54 +02:00
Rafał
9ec23f1234
Add create_dir function. ( #5 )
2017-10-27 14:12:53 +02:00
Rafał
529d717e30
Add .editorconfig file and fix whitespaces in existing files. ( #4 )
2017-10-25 17:20:27 +02:00
Rafał
df98ca8779
Create file functionality ( #3 )
...
* Support removing files and directories.
* Add create_file functionality.
2017-10-21 15:35:26 +02:00
Rafał Harabień
ba5329edad
Support removing files and directories.
2017-10-20 16:18:17 +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ń
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