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