RarExtractor¶
-
class
tfsnippet.utils.
RarExtractor
(fpath)¶ Bases:
tfsnippet.utils.archive_file.Extractor
Extractor for “.rar” files.
Methods Summary
close
()Close the extractor. iter_extract
()Extract files from the archive with an iterator. open
(file_path)Create an Extractor
instance for given archive file.Methods Documentation
-
close
()¶ Close the extractor.
-
iter_extract
()¶ Extract files from the archive with an iterator.
You may simply iterate over a
Extractor
object, which is same as calling to this method.Yields: (str, file-like) –
- Tuples of
(name, file-like object)
, the filename and corresponding file-like object for each file in the archive. The returned file-like object may or may not be closeable. You may surround it by
maybe_close()
.
- Tuples of
-