Crates.io | readwriteseekfs |
lib.rs | readwriteseekfs |
version | 0.1.0 |
source | src |
created_at | 2018-08-19 00:18:29.810722 |
updated_at | 2018-08-19 00:18:29.810722 |
description | Expose Read+Write+Seek (or just Read+Seek) as a FUSE-backed regular file |
homepage | |
repository | https://github.com/vi/readwriteseekfs |
max_upload_size | |
id | 80159 |
size | 11,131 |
A fuse::Filesystem
implementation based on any Read
+Write+Seek
implementation. Using this library you can easily expose file-like objects in Rust as a mountable single-file FUSE filesystem.
Read-only files can be crated from just Read+Seek, without Write.
See examples/simple.rs for the code.
First console:
cargo run --example=simple
Second console:
$ hd hello.txt
00000000 48 65 6c 6c 6f 2c 20 77 6f 72 6c 64 0a 00 00 00 |Hello, world....|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00010000
$ echo qwe > hello.txt
$ hd hello.txt
00000000 71 77 65 0a 6f 2c 20 77 6f 72 6c 64 0a 00 00 00 |qwe.o, world....|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00010000
$ fusermount -u hello.txt