diff options
Diffstat (limited to 'dump_chunk.py')
-rwxr-xr-x | dump_chunk.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/dump_chunk.py b/dump_chunk.py new file mode 100755 index 0000000..8212e62 --- /dev/null +++ b/dump_chunk.py @@ -0,0 +1,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 ) |