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.
8 A writeable fused file is set up by associating the mount with a
11 FUSE file mount for combining file fragments.
14 *fusefile* [_fuse options_] *mountpoint* _filename/from-to_ ...
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.
23 The fragment arguments include the filename of a source file, and
24 optionally start and end byte positions. All in all there five
27 * __filename__ include all of the file.
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.
31 * __filename/from__ include the file from the given start position, to end.
33 * __filename/-to__ include the file from beginning to the given end position (not included).
35 * __filename/from-to__ include the file from the given start position, up to the given end position (not included).
37 * *pad=*_filename_ when this is given as first argument, the fused
38 file is set up as a writable random-access file, where the write
39 events are captured appended to the nominated "pad" file. The new
40 content is inserted into the fused file but not the original files,
41 and fragments are split up and adjusted as needed so as to make the
42 write events appear as insertions inteo the fused file.
46 Insert file "y" into file "x" at position 1200:
48 $ fusefile -ononempty x x/-1200 y x/1200
49 The bind mount shadows the original file "x", and presents the
52 Make file y be a swap of the beginning and end of file "x", at
55 $ fusefile y x/2442 x/-2442
59 Note that **fusefile** opens the nominated source file(s) before bind
60 mounting. With the fuse option __-ononempty__ it will bind over an
61 non-empty file, which may be useful. The source file descriptors
62 remain open, but the source fragments are not recomputed. If a source
63 file changes or reduces in size, anything may happen.
65 If the mountpoint file doesn't exist, then **fusefile** creates it,
66 and removes it when unmounted.
68 When a "pad" file is used, it is updated as a simple archive where
69 each write event is a new member appended at the end. Each "pad"
70 member has a prefix of two newline-terminated text lines telling the
71 insertion position and the member size (both as ascii decimal digits),
72 before the actual insertion event content.
76 Ralph Rönnquist <ralph.ronnquist@gmail.com>