aboutsummaryrefslogtreecommitdiffstats
path: root/dump_chunk.py
blob: 8212e625f8086a11422cec7e7d09819dcbca7fd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python

import FuseArchive.Chunk, sys, pickle, os

# This prints some debug info about a chunk
f = FuseArchive.Chunk.Chunk.parse_header( open( sys.argv[ 1 ] ).read(
    FuseArchive.Chunk.header_length ) )
print f
os.system( "ls -l %s" % sys.argv[ 1 ] )

# Detail
if len( sys.argv ) == 3:
    f = FuseArchive.Chunk.Chunk.deserialize( open( sys.argv[ 1 ] ).read() )
    pickle.dump( f, sys.stdout, 0 )