I used a fuse plugin named 'concatfs'
It can virtual merge some file with a specific filename like
xxx-concat-.mkv
, and this file's content is a TEXT:
1.mkv
2.mkv
3.mkv
system reads
xxx-concat-.mkv
, it outputs a merged file with1.mkv 2.mkv ...
. but the files are not merged in fact, it's a virtual output.
So, My question is :
offset: 0xa 0xb 0xc 0xd
in these copies. the 4 bytes is people's idconcatfs
, content mostly like:(all binary)1.zip
0xa 4 replaced-4bytes-binary-content
0x1111 10 replaced-10bytes-binary-content
1-replaced-123.zip
, the fuse
will outputing the replaced content.do you have some suggestion?
Thanks a lot, and sorry for my english.
Use merged-fuse to virtual merge/replace files (C++ 11)
https://github.com/fly-studio/merged-fuse
Example
1.txt
12345678
2.txt
abcdefghi
Make a file named 1-merged-.txt
,
-merged-
is a special words in the file name
content is JSON format
[
{
"path": "1.txt"
},
{
"path": "2.txt",
"replaces": [
{
"offset": 2,
"length": 2,
"content": "MjE="
}
]
}
]
When cat 1-merged-.txt
, output:
12345678ab12efghi
You can see the files were merged(virtual), and the content was replaced:
cd
replaced to 12