Viewing File: /opt/alt/python35/lib64/python3.5/__pycache__/chunk.cpython-35.opt-2.pyc



]1@sGdddZdS)c@seZdZdddddZddZddZd	d
ZddZd
ddZddZ	dddZ
ddZdS)ChunkTFcCsddl}d|_||_|r-d}nd}||_|jd|_t|jdkrity*|j|d|jdd|_	Wn|j
k
rtYnX|r|j	d|_	d|_y|jj|_
Wn!ttfk
r	d|_Yn
Xd|_dS)	NF><LT)structclosedalignfileread	chunknamelenEOFErrorunpack_from	chunksizeerror	size_readtelloffsetAttributeErrorOSErrorseekable)selfrr
Z	bigendianZ
inclheaderrZstrflagr*/opt/alt/python35/lib64/python3.5/chunk.py__init__4s,				*	zChunk.__init__cCs|jS)N)r
)rrrrgetnameNsz
Chunk.getnamecCs|jS)N)r)rrrrgetsizeRsz
Chunk.getsizecCs(|js$z|jWdd|_XdS)NT)r	skip)rrrrcloseVs	zChunk.closecCs|jrtddS)NzI/O operation on closed fileF)r	
ValueError)rrrrisatty]s	zChunk.isattyrcCs|jrtd|js*td|dkrF||j}n|dkr_||j}|dksz||jkrt|jj|j	|d||_dS)NzI/O operation on closed filezcannot seekr)
r	r!rrrrRuntimeErrorrseekr)rposwhencerrrr&bs		
z
Chunk.seekcCs|jrtd|jS)NzI/O operation on closed file)r	r!r)rrrrrus	z
Chunk.tellr#cCs|jrtd|j|jkr+dS|dkrG|j|j}||j|jkrm|j|j}|jj|}|jt||_|j|jkr|jr|jd@r|jjd}|jt||_|S)NzI/O operation on closed filerr#)r	r!rrrrrr
)rsizedatadummyrrrrzs 		
z
Chunk.readcCs|jrtd|jry[|j|j}|jrQ|jd@rQ|d}|jj|d|j||_dSWntk
rYnXxJ|j|jkrt	d|j|j}|j
|}|stqWdS)NzI/O operation on closed filer#i )r	r!rrrr
rr&rminrr)rnr,rrrrs"		

z
Chunk.skipN)__name__
__module____qualname__rrrr r"r&rrrrrrrr3srN)rrrrr<module>3s
Back to Directory File Manager