corrected region access
[rrq/fusefile.git] / README.adoc
1 fusefile
2 ========
3
4 This project implements a "fuse" device to mount as a single file that
5 is a concatenation of fragments of one or more files. The fused file
6 allows overwriting the parts files, but not changing their sizes, and
7 only for parts files that are writable upon first access.
8
9 FUSE file mount for combining file fragments.
10  
11 == SYNOPSIS
12  *fusefile* [_fuse options_] *mountpoint* _filename/from-to_ ...
13
14 ## DESCRIPTION
15
16 *fusefile* is FUSE file mount that presents a series of fragments of
17 other files as a contiguous concatenation. It bind mounts a driver on
18 top of the file mountpoint to present the nominated file fragments as
19 a single, contiguous file.
20
21 The fragment arguments include the filename of a source file, and
22 optionally start and end byte positions. All in all there five
23 variations:
24
25  * __filename__ include all of the file.
26
27  * __filename/__ include all of the file named with "/" in the pathname. This case requires a final "/", since the last "/" separates the filename from the position details.
28
29  * __filename/from__ include the file from the given start position, to end.
30
31  * __filename/-to__ include the file from beginning to the given end position (not included).
32
33  * __filename/from-to__ include the file from the given start position, up to the given end position (not included). 
34
35 ## EXAMPLES
36
37 Insert file "y" into file "x" at position 1200:
38   
39     $ fusefile -ononempty x x/-1200 y x/1200
40 The bind mount shadows the original file "x", and presents the
41 composite instead.
42
43 Make file y be a swap of the beginning and end of file "x", at
44 position 2442:
45
46     $ fusefile y x/2442 x/-2442
47
48 ## NOTES
49
50 Note that **fusefile** opens the nominated source file(s) before bind
51 mounting. With the fuse option __-ononempty__ it will bind over an
52 non-empty file, which may be useful. The source file descriptors
53 remain open, but the source fragments are not recomputed. If a source
54 file changes or reduces in size, anything may happen.
55
56 If the mountpoint file doesn't exist, then **fusefile** creates it,
57 and removes it when unmounted.
58
59 ## AUTHOR
60
61 Ralph Rönnquist <ralph.ronnquist@gmail.com>