removed
[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
13 ====
14 *fusefile* [ _fuse options_ ] *mountpoint*  +_filename_/from:to+ ...
15 ====
16
17 ## DESCRIPTION
18
19 *fusefile* is FUSE file mount that presents a series of fragments of
20 other files as a contiguous concatenation. It bind mounts a driver on
21 top of the file mountpoint to present the nominated file fragments as
22 a single, contiguous file.
23
24 The fragment arguments include the filename of a source file, and
25 optionally start and end byte positions. All in all there five
26 variations:
27
28  * __filename__ include all of the file.
29
30  * __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.
31
32  * __filename/from__ include the file from the given start position, to end.
33
34  * __filename/-to__ include the file from beginning to the given end position (not included).
35
36  * __filename/from:to__ include the file from the given start position, up to the given end position (not included). 
37
38 ## EXAMPLES
39
40 .Insert file "y" into file "x" at position 1200:
41   
42     $ fusefile -ononempty x x/:1200 y x/1200:
43
44 That mount will shadow the original file "x", and presents the
45 fused file instead.
46
47 .Make file y be a swap of the beginning and end of file "x", at position 2442:
48
49     $ fusefile y x/2442: x/:2442
50
51 .Replace a partition in an image file with a different file
52
53     $ partx -oNR,START,SECTORS disk.raw
54     NR   START  SECTORS
55      1    2048  2097152
56      2 2099200   409600
57      3 2508800 14268383
58     # Replace partition 2 of 409600 sectors from 2099200 with
59     # the file "insert.fat" clipped to 409600 sectors.
60     $ fusefile -ononempty disk.raw \
61          disk.raw/0:$(( 2099200*512 )) \
62          insert.fat/0:$(( 409600*512 )) \
63          disk.raw/$(( (2099200+409600)*512 )):
64
65
66 ## NOTES
67
68 Note that **fusefile** opens the nominated source file(s) before bind
69 mounting. With the fuse option __-ononempty__ it will bind over an
70 non-empty file, which may be useful. The source file descriptors
71 remain open, but the source fragments are not recomputed. If a source
72 file changes or reduces in size "behind" the fused file, then anything
73 may happen.
74
75 If the mountpoint file doesn't exist, then **fusefile** creates it and
76 removes it when unmounted.
77
78 Unmounting is done with "fusermount -u __fused file__" as usual.
79
80 ## AUTHOR
81
82 Ralph Rönnquist <ralph.ronnquist@gmail.com>