@@ -3831,20 +3831,20 @@ def PackArchiveFileFromSevenZipFile(infile, outfile, compression="auto", compres
38313831
38323832create_alias_function ("Pack" , __file_format_name__ , "FromSevenZipFile" , PackArchiveFileFromSevenZipFile );
38333833
3834- def ArchiveFileSeekToFileNum (infile , seekto = 0 , skipchecksum = False , formatspecs = __file_format_list__ , returnfp = False ):
3834+ def ArchiveFileSeekToFileNum (infile , seekto = 0 , listonly = False , skipchecksum = False , formatspecs = __file_format_list__ , returnfp = False ):
38353835 if (hasattr (infile , "read" ) or hasattr (infile , "write" )):
38363836 catfp = infile ;
38373837 catfp .seek (0 , 0 );
38383838 catfp = UncompressArchiveFile (catfp , formatspecs );
38393839 checkcompressfile = CheckCompressionSubType (catfp , formatspecs , True );
38403840 if (checkcompressfile == "tarfile" ):
3841- return TarFileToArray (infile , 0 , 0 , listonly , skipchecksum , formatspecs , returnfp );
3841+ return TarFileToArray (infile , seekto , 0 , listonly , skipchecksum , formatspecs , returnfp );
38423842 if (checkcompressfile == "zipfile" ):
3843- return ZipFileToArray (infile , 0 , 0 , listonly , skipchecksum , formatspecs , returnfp );
3843+ return ZipFileToArray (infile , seekto , 0 , listonly , skipchecksum , formatspecs , returnfp );
38443844 if (rarfile_support and checkcompressfile == "rarfile" ):
3845- return RarFileToArray (infile , 0 , 0 , listonly , skipchecksum , formatspecs , returnfp );
3845+ return RarFileToArray (infile , seekto , 0 , listonly , skipchecksum , formatspecs , returnfp );
38463846 if (py7zr_support and checkcompressfile == "7zipfile" ):
3847- return SevenZipFileToArray (infile , 0 , 0 , listonly , skipchecksum , formatspecs , returnfp );
3847+ return SevenZipFileToArray (infile , seekto , 0 , listonly , skipchecksum , formatspecs , returnfp );
38483848 if (checkcompressfile != "catfile" and checkcompressfile != formatspecs [2 ]):
38493849 return False ;
38503850 if (not catfp ):
@@ -3872,13 +3872,13 @@ def ArchiveFileSeekToFileNum(infile, seekto=0, skipchecksum=False, formatspecs=_
38723872 infile = RemoveWindowsPath (infile );
38733873 checkcompressfile = CheckCompressionSubType (infile , formatspecs , True );
38743874 if (checkcompressfile == "tarfile" ):
3875- return TarFileToArray (infile , 0 , 0 , listonly , skipchecksum , formatspecs , returnfp );
3875+ return TarFileToArray (infile , seekto , 0 , listonly , skipchecksum , formatspecs , returnfp );
38763876 if (checkcompressfile == "zipfile" ):
3877- return ZipFileToArray (infile , 0 , 0 , listonly , skipchecksum , formatspecs , returnfp );
3877+ return ZipFileToArray (infile , seekto , 0 , listonly , skipchecksum , formatspecs , returnfp );
38783878 if (rarfile_support and checkcompressfile == "rarfile" ):
3879- return RarFileToArray (infile , 0 , 0 , listonly , skipchecksum , formatspecs , returnfp );
3879+ return RarFileToArray (infile , seekto , 0 , listonly , skipchecksum , formatspecs , returnfp );
38803880 if (py7zr_support and checkcompressfile == "7zipfile" ):
3881- return SevenZipFileToArray (infile , 0 , 0 , listonly , skipchecksum , formatspecs , returnfp );
3881+ return SevenZipFileToArray (infile , seekto , 0 , listonly , skipchecksum , formatspecs , returnfp );
38823882 if (checkcompressfile != "catfile" and checkcompressfile != formatspecs [2 ]):
38833883 return False ;
38843884 compresscheck = CheckCompressionType (infile , formatspecs , True );
@@ -4060,7 +4060,7 @@ def ArchiveFileSeekToFileNum(infile, seekto=0, skipchecksum=False, formatspecs=_
40604060
40614061create_alias_function ("" , __file_format_name__ , "SeekToFileNum" , ArchiveFileSeekToFileNum );
40624062
4063- def ArchiveFileSeekToFileName (infile , seekfile = None , skipchecksum = False , formatspecs = __file_format_list__ , returnfp = False ):
4063+ def ArchiveFileSeekToFileName (infile , seekfile = None , listonly = False , skipchecksum = False , formatspecs = __file_format_list__ , returnfp = False ):
40644064 if (hasattr (infile , "read" ) or hasattr (infile , "write" )):
40654065 catfp = infile ;
40664066 catfp .seek (0 , 0 );
@@ -4308,13 +4308,13 @@ def ArchiveFileValidate(infile, formatspecs=__file_format_list__, verbose=False,
43084308 catfp = UncompressArchiveFile (catfp , formatspecs );
43094309 checkcompressfile = CheckCompressionSubType (catfp , formatspecs , True );
43104310 if (checkcompressfile == "tarfile" ):
4311- return TarFileToArray (infile , seekstart , seekend , listonly , skipchecksum , formatspecs , returnfp );
4311+ return TarFileToArray (infile , 0 , 0 , False , False , formatspecs , returnfp );
43124312 if (checkcompressfile == "zipfile" ):
4313- return ZipFileToArray (infile , seekstart , seekend , listonly , skipchecksum , formatspecs , returnfp );
4313+ return ZipFileToArray (infile , 0 , 0 , False , False , formatspecs , returnfp );
43144314 if (rarfile_support and checkcompressfile == "rarfile" ):
4315- return RarFileToArray (infile , seekstart , seekend , listonly , skipchecksum , formatspecs , returnfp );
4315+ return RarFileToArray (infile , 0 , 0 , False , False , formatspecs , returnfp );
43164316 if (py7zr_support and checkcompressfile == "7zipfile" ):
4317- return SevenZipFileToArray (infile , 0 , 0 , listonly , skipchecksum , formatspecs , returnfp );
4317+ return SevenZipFileToArray (infile , 0 , 0 , False , False , formatspecs , returnfp );
43184318 if (checkcompressfile != "catfile" and checkcompressfile != formatspecs [2 ]):
43194319 return False ;
43204320 if (not catfp ):
@@ -4342,13 +4342,13 @@ def ArchiveFileValidate(infile, formatspecs=__file_format_list__, verbose=False,
43424342 infile = RemoveWindowsPath (infile );
43434343 checkcompressfile = CheckCompressionSubType (infile , formatspecs , True );
43444344 if (checkcompressfile == "tarfile" ):
4345- return TarFileToArray (infile , seekstart , seekend , listonly , skipchecksum , formatspecs , returnfp );
4345+ return TarFileToArray (infile , 0 , 0 , False , False , formatspecs , returnfp );
43464346 if (checkcompressfile == "zipfile" ):
4347- return ZipFileToArray (infile , seekstart , seekend , listonly , skipchecksum , formatspecs , returnfp );
4347+ return ZipFileToArray (infile , 0 , 0 , False , False , formatspecs , returnfp );
43484348 if (rarfile_support and checkcompressfile == "rarfile" ):
4349- return RarFileToArray (infile , seekstart , seekend , listonly , skipchecksum , formatspecs , returnfp );
4349+ return RarFileToArray (infile , 0 , 0 , False , False , formatspecs , returnfp );
43504350 if (py7zr_support and checkcompressfile == "7zipfile" ):
4351- return SevenZipFileToArray (infile , 0 , 0 , listonly , skipchecksum , formatspecs , returnfp );
4351+ return SevenZipFileToArray (infile , 0 , 0 , False , False , formatspecs , returnfp );
43524352 if (checkcompressfile != "catfile" and checkcompressfile != formatspecs [2 ]):
43534353 return False ;
43544354 compresscheck = CheckCompressionType (infile , formatspecs , True );
@@ -4551,7 +4551,7 @@ def ArchiveFileToArray(infile, seekstart=0, seekend=0, listonly=False, skipcheck
45514551 if (rarfile_support and checkcompressfile == "rarfile" ):
45524552 return RarFileToArray (infile , seekstart , seekend , listonly , skipchecksum , formatspecs , returnfp );
45534553 if (py7zr_support and checkcompressfile == "7zipfile" ):
4554- return SevenZipFileToArray (infile , 0 , 0 , listonly , skipchecksum , formatspecs , returnfp );
4554+ return SevenZipFileToArray (infile , seekstart , seekend , listonly , skipchecksum , formatspecs , returnfp );
45554555 if (checkcompressfile != "catfile" and checkcompressfile != formatspecs [2 ]):
45564556 return False ;
45574557 if (not catfp ):
@@ -4585,7 +4585,7 @@ def ArchiveFileToArray(infile, seekstart=0, seekend=0, listonly=False, skipcheck
45854585 if (rarfile_support and checkcompressfile == "rarfile" ):
45864586 return RarFileToArray (infile , seekstart , seekend , listonly , skipchecksum , formatspecs , returnfp );
45874587 if (py7zr_support and checkcompressfile == "7zipfile" ):
4588- return SevenZipFileToArray (infile , 0 , 0 , listonly , skipchecksum , formatspecs , returnfp );
4588+ return SevenZipFileToArray (infile , , seekstart , seekend , listonly , skipchecksum , formatspecs , returnfp );
45894589 if (checkcompressfile != "catfile" and checkcompressfile != formatspecs [2 ]):
45904590 return False ;
45914591 compresscheck = CheckCompressionType (infile , formatspecs , True );
@@ -7706,7 +7706,7 @@ def ListDirListFiles(infiles, dirlistfromtxt=False, compression="auto", compress
77067706 listcatfiles = ArchiveFileListFiles (outarray , seekstart , seekend , skipchecksum , formatspecs , verbose , returnfp );
77077707 return listcatfiles ;
77087708
7709- def ListDirListFilesAlt (infiles , dirlistfromtxt = False , followlink = False , listonly = True , seekstart = 0 , seekend = 0 , skipchecksum = False , checksumtype = "crc32" , formatspecs = __file_format_list__ , verbose = False , returnfp = False ):
7709+ def ListDirListFilesAlt (infiles , dirlistfromtxt = False , followlink = False , listonly = False , seekstart = 0 , seekend = 0 , skipchecksum = False , checksumtype = "crc32" , formatspecs = __file_format_list__ , verbose = False , returnfp = False ):
77107710 outarray = ListDirToArrayAlt (infiles , dirlistfromtxt , followlink , listonly , checksumtype , formatspecs , verbose );
77117711 listcatfiles = ArchiveFileListFiles (outarray , seekstart , seekend , skipchecksum , formatspecs , verbose , returnfp );
77127712 return listcatfiles ;
0 commit comments