PyArchiveFile 0.24.0__tar.gz → 0.24.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/PKG-INFO +1 -1
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/PyArchiveFile.egg-info/PKG-INFO +1 -1
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/archivefile.py +1 -1
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/pyarchivefile.py +178 -25
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/pyproject.toml +1 -1
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/LICENSE +0 -0
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/PyArchiveFile.egg-info/SOURCES.txt +0 -0
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/PyArchiveFile.egg-info/dependency_links.txt +0 -0
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/PyArchiveFile.egg-info/top_level.txt +0 -0
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/PyArchiveFile.egg-info/zip-safe +0 -0
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/README.md +0 -0
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/archiveneofile.py +0 -0
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/neoarchivefile.py +0 -0
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/setup.cfg +0 -0
- {pyarchivefile-0.24.0 → pyarchivefile-0.24.2}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyArchiveFile
|
|
3
|
-
Version: 0.24.
|
|
3
|
+
Version: 0.24.2
|
|
4
4
|
Summary: A tar like file format name archivefile.
|
|
5
5
|
Home-page: https://github.com/GameMaker2k/PyArchiveFile
|
|
6
6
|
Download-URL: https://github.com/GameMaker2k/PyArchiveFile/archive/master.tar.gz
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyArchiveFile
|
|
3
|
-
Version: 0.24.
|
|
3
|
+
Version: 0.24.2
|
|
4
4
|
Summary: A tar like file format name archivefile.
|
|
5
5
|
Home-page: https://github.com/GameMaker2k/PyArchiveFile
|
|
6
6
|
Download-URL: https://github.com/GameMaker2k/PyArchiveFile/archive/master.tar.gz
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
Copyright 2018-2024 Game Maker 2k - http://intdb.sourceforge.net/
|
|
15
15
|
Copyright 2018-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
|
|
16
16
|
|
|
17
|
-
$FileInfo: archivefile.py - Last Update: 10/
|
|
17
|
+
$FileInfo: archivefile.py - Last Update: 10/31/2025 Ver. 0.24.2 RC 1 - Author: cooldude2k $
|
|
18
18
|
'''
|
|
19
19
|
|
|
20
20
|
from __future__ import absolute_import, division, print_function, unicode_literals, generators, with_statement, nested_scopes
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
Copyright 2018-2024 Game Maker 2k - http://intdb.sourceforge.net/
|
|
15
15
|
Copyright 2018-2024 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
|
|
16
16
|
|
|
17
|
-
$FileInfo: pyarchivefile.py - Last Update: 10/
|
|
17
|
+
$FileInfo: pyarchivefile.py - Last Update: 10/31/2025 Ver. 0.24.2 RC 1 - Author: cooldude2k $
|
|
18
18
|
'''
|
|
19
19
|
|
|
20
20
|
from __future__ import absolute_import, division, print_function, unicode_literals, generators, with_statement, nested_scopes
|
|
@@ -623,12 +623,12 @@ __file_format_extension__ = __file_format_multi_dict__[__file_format_default__][
|
|
|
623
623
|
__file_format_dict__ = __file_format_multi_dict__[__file_format_default__]
|
|
624
624
|
__project__ = __program_name__
|
|
625
625
|
__project_url__ = "https://github.com/GameMaker2k/PyArchiveFile"
|
|
626
|
-
__version_info__ = (0, 24,
|
|
627
|
-
__version_date_info__ = (2025, 10,
|
|
626
|
+
__version_info__ = (0, 24, 2, "RC 1", 1)
|
|
627
|
+
__version_date_info__ = (2025, 10, 31, "RC 1", 1)
|
|
628
628
|
__version_date__ = str(__version_date_info__[0]) + "." + str(
|
|
629
629
|
__version_date_info__[1]).zfill(2) + "." + str(__version_date_info__[2]).zfill(2)
|
|
630
630
|
__revision__ = __version_info__[3]
|
|
631
|
-
__revision_id__ = "$Id:
|
|
631
|
+
__revision_id__ = "$Id: 62e42aa44d2836eb3c32bec6badb12ea21c1ebc3 $"
|
|
632
632
|
if(__version_info__[4] is not None):
|
|
633
633
|
__version_date_plusrc__ = __version_date__ + \
|
|
634
634
|
"-" + str(__version_date_info__[4])
|
|
@@ -6463,8 +6463,7 @@ def AppendFileHeaderWithContent(fp, filevalues=[], extradata=[], jsondata={}, fi
|
|
|
6463
6463
|
pass
|
|
6464
6464
|
return fp
|
|
6465
6465
|
|
|
6466
|
-
|
|
6467
|
-
def AppendFilesWithContent(infiles, fp, dirlistfromtxt=False, filevalues=[], extradata=[], jsondata={}, compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, followlink=False, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_dict__, verbose=False):
|
|
6466
|
+
def AppendFilesWithContent(infiles, fp, dirlistfromtxt=False, extradata=[], jsondata={}, compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, followlink=False, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_dict__, verbose=False):
|
|
6468
6467
|
if(not hasattr(fp, "write")):
|
|
6469
6468
|
return False
|
|
6470
6469
|
advancedlist = formatspecs['use_advanced_list']
|
|
@@ -6514,6 +6513,16 @@ def AppendFilesWithContent(infiles, fp, dirlistfromtxt=False, filevalues=[], ext
|
|
|
6514
6513
|
numfiles = int(len(GetDirList))
|
|
6515
6514
|
fnumfiles = format(numfiles, 'x').lower()
|
|
6516
6515
|
AppendFileHeader(fp, numfiles, "UTF-8", [], checksumtype[0], formatspecs)
|
|
6516
|
+
try:
|
|
6517
|
+
fp.flush()
|
|
6518
|
+
if(hasattr(os, "sync")):
|
|
6519
|
+
os.fsync(fp.fileno())
|
|
6520
|
+
except io.UnsupportedOperation:
|
|
6521
|
+
pass
|
|
6522
|
+
except AttributeError:
|
|
6523
|
+
pass
|
|
6524
|
+
except OSError:
|
|
6525
|
+
pass
|
|
6517
6526
|
FullSizeFilesAlt = 0
|
|
6518
6527
|
for curfname in GetDirList:
|
|
6519
6528
|
fencoding = "UTF-8"
|
|
@@ -6765,6 +6774,16 @@ def AppendFilesWithContent(infiles, fp, dirlistfromtxt=False, filevalues=[], ext
|
|
|
6765
6774
|
fcsize, fuid, funame, fgid, fgname, fcurfid, fcurinode, flinkcount, fdev, fdev_minor, fdev_major, "+"+str(len(formatspecs['format_delimiter']))]
|
|
6766
6775
|
AppendFileHeaderWithContent(
|
|
6767
6776
|
fp, tmpoutlist, extradata, jsondata, fcontents.read(), [checksumtype[1], checksumtype[2], checksumtype[3]], formatspecs)
|
|
6777
|
+
try:
|
|
6778
|
+
fp.flush()
|
|
6779
|
+
if(hasattr(os, "sync")):
|
|
6780
|
+
os.fsync(fp.fileno())
|
|
6781
|
+
except io.UnsupportedOperation:
|
|
6782
|
+
pass
|
|
6783
|
+
except AttributeError:
|
|
6784
|
+
pass
|
|
6785
|
+
except OSError:
|
|
6786
|
+
pass
|
|
6768
6787
|
return fp
|
|
6769
6788
|
|
|
6770
6789
|
def AppendFilesWithContentFromTarFile(infile, fp, extradata=[], jsondata={}, compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_dict__, verbose=False):
|
|
@@ -6773,8 +6792,6 @@ def AppendFilesWithContentFromTarFile(infile, fp, extradata=[], jsondata={}, com
|
|
|
6773
6792
|
if(verbose):
|
|
6774
6793
|
logging.basicConfig(format="%(message)s",
|
|
6775
6794
|
stream=sys.stdout, level=logging.DEBUG)
|
|
6776
|
-
formver = formatspecs['format_ver']
|
|
6777
|
-
fileheaderver = str(int(formver.replace(".", "")))
|
|
6778
6795
|
curinode = 0
|
|
6779
6796
|
curfid = 0
|
|
6780
6797
|
inodelist = []
|
|
@@ -6842,6 +6859,16 @@ def AppendFilesWithContentFromTarFile(infile, fp, extradata=[], jsondata={}, com
|
|
|
6842
6859
|
return False
|
|
6843
6860
|
numfiles = int(len(tarfp.getmembers()))
|
|
6844
6861
|
AppendFileHeader(fp, numfiles, "UTF-8", [], checksumtype[0], formatspecs)
|
|
6862
|
+
try:
|
|
6863
|
+
fp.flush()
|
|
6864
|
+
if(hasattr(os, "sync")):
|
|
6865
|
+
os.fsync(fp.fileno())
|
|
6866
|
+
except io.UnsupportedOperation:
|
|
6867
|
+
pass
|
|
6868
|
+
except AttributeError:
|
|
6869
|
+
pass
|
|
6870
|
+
except OSError:
|
|
6871
|
+
pass
|
|
6845
6872
|
for member in sorted(tarfp.getmembers(), key=lambda x: x.name):
|
|
6846
6873
|
fencoding = "UTF-8"
|
|
6847
6874
|
if(re.findall("^[.|/]", member.name)):
|
|
@@ -6980,6 +7007,16 @@ def AppendFilesWithContentFromTarFile(infile, fp, extradata=[], jsondata={}, com
|
|
|
6980
7007
|
fcsize, fuid, funame, fgid, fgname, fcurfid, fcurinode, flinkcount, fdev, fdev_minor, fdev_major, "+"+str(len(formatspecs['format_delimiter']))]
|
|
6981
7008
|
AppendFileHeaderWithContent(
|
|
6982
7009
|
fp, tmpoutlist, extradata, jsondata, fcontents.read(), [checksumtype[1], checksumtype[2], checksumtype[3]], formatspecs)
|
|
7010
|
+
try:
|
|
7011
|
+
fp.flush()
|
|
7012
|
+
if(hasattr(os, "sync")):
|
|
7013
|
+
os.fsync(fp.fileno())
|
|
7014
|
+
except io.UnsupportedOperation:
|
|
7015
|
+
pass
|
|
7016
|
+
except AttributeError:
|
|
7017
|
+
pass
|
|
7018
|
+
except OSError:
|
|
7019
|
+
pass
|
|
6983
7020
|
fcontents.close()
|
|
6984
7021
|
return fp
|
|
6985
7022
|
|
|
@@ -6989,8 +7026,6 @@ def AppendFilesWithContentFromZipFile(infile, fp, extradata=[], jsondata={}, com
|
|
|
6989
7026
|
if(verbose):
|
|
6990
7027
|
logging.basicConfig(format="%(message)s",
|
|
6991
7028
|
stream=sys.stdout, level=logging.DEBUG)
|
|
6992
|
-
formver = formatspecs['format_ver']
|
|
6993
|
-
fileheaderver = str(int(formver.replace(".", "")))
|
|
6994
7029
|
curinode = 0
|
|
6995
7030
|
curfid = 0
|
|
6996
7031
|
inodelist = []
|
|
@@ -7028,6 +7063,16 @@ def AppendFilesWithContentFromZipFile(infile, fp, extradata=[], jsondata={}, com
|
|
|
7028
7063
|
VerbosePrintOut("Bad file found!")
|
|
7029
7064
|
numfiles = int(len(zipfp.infolist()))
|
|
7030
7065
|
AppendFileHeader(fp, numfiles, "UTF-8", [], checksumtype[0], formatspecs)
|
|
7066
|
+
try:
|
|
7067
|
+
fp.flush()
|
|
7068
|
+
if(hasattr(os, "sync")):
|
|
7069
|
+
os.fsync(fp.fileno())
|
|
7070
|
+
except io.UnsupportedOperation:
|
|
7071
|
+
pass
|
|
7072
|
+
except AttributeError:
|
|
7073
|
+
pass
|
|
7074
|
+
except OSError:
|
|
7075
|
+
pass
|
|
7031
7076
|
for member in sorted(zipfp.infolist(), key=lambda x: x.filename):
|
|
7032
7077
|
fencoding = "UTF-8"
|
|
7033
7078
|
if(re.findall("^[.|/]", member.filename)):
|
|
@@ -7190,6 +7235,16 @@ def AppendFilesWithContentFromZipFile(infile, fp, extradata=[], jsondata={}, com
|
|
|
7190
7235
|
fcsize, fuid, funame, fgid, fgname, fcurfid, fcurinode, flinkcount, fdev, fdev_minor, fdev_major, "+"+str(len(formatspecs['format_delimiter']))]
|
|
7191
7236
|
AppendFileHeaderWithContent(
|
|
7192
7237
|
fp, tmpoutlist, extradata, jsondata, fcontents.read(), [checksumtype[1], checksumtype[2], checksumtype[3]], formatspecs)
|
|
7238
|
+
try:
|
|
7239
|
+
fp.flush()
|
|
7240
|
+
if(hasattr(os, "sync")):
|
|
7241
|
+
os.fsync(fp.fileno())
|
|
7242
|
+
except io.UnsupportedOperation:
|
|
7243
|
+
pass
|
|
7244
|
+
except AttributeError:
|
|
7245
|
+
pass
|
|
7246
|
+
except OSError:
|
|
7247
|
+
pass
|
|
7193
7248
|
fcontents.close()
|
|
7194
7249
|
return fp
|
|
7195
7250
|
|
|
@@ -7204,8 +7259,6 @@ if(rarfile_support):
|
|
|
7204
7259
|
if(verbose):
|
|
7205
7260
|
logging.basicConfig(format="%(message)s",
|
|
7206
7261
|
stream=sys.stdout, level=logging.DEBUG)
|
|
7207
|
-
formver = formatspecs['format_ver']
|
|
7208
|
-
fileheaderver = str(int(formver.replace(".", "")))
|
|
7209
7262
|
curinode = 0
|
|
7210
7263
|
curfid = 0
|
|
7211
7264
|
inodelist = []
|
|
@@ -7222,6 +7275,16 @@ if(rarfile_support):
|
|
|
7222
7275
|
VerbosePrintOut("Bad file found!")
|
|
7223
7276
|
numfiles = int(len(rarfp.infolist()))
|
|
7224
7277
|
AppendFileHeader(fp, numfiles, "UTF-8", [], checksumtype[0], formatspecs)
|
|
7278
|
+
try:
|
|
7279
|
+
fp.flush()
|
|
7280
|
+
if(hasattr(os, "sync")):
|
|
7281
|
+
os.fsync(fp.fileno())
|
|
7282
|
+
except io.UnsupportedOperation:
|
|
7283
|
+
pass
|
|
7284
|
+
except AttributeError:
|
|
7285
|
+
pass
|
|
7286
|
+
except OSError:
|
|
7287
|
+
pass
|
|
7225
7288
|
try:
|
|
7226
7289
|
fp.flush()
|
|
7227
7290
|
if(hasattr(os, "sync")):
|
|
@@ -7426,6 +7489,16 @@ if(rarfile_support):
|
|
|
7426
7489
|
fcsize, fuid, funame, fgid, fgname, fcurfid, fcurinode, flinkcount, fdev, fdev_minor, fdev_major, "+"+str(len(formatspecs['format_delimiter']))]
|
|
7427
7490
|
AppendFileHeaderWithContent(
|
|
7428
7491
|
fp, tmpoutlist, extradata, jsondata, fcontents.read(), [checksumtype[1], checksumtype[2], checksumtype[3]], formatspecs)
|
|
7492
|
+
try:
|
|
7493
|
+
fp.flush()
|
|
7494
|
+
if(hasattr(os, "sync")):
|
|
7495
|
+
os.fsync(fp.fileno())
|
|
7496
|
+
except io.UnsupportedOperation:
|
|
7497
|
+
pass
|
|
7498
|
+
except AttributeError:
|
|
7499
|
+
pass
|
|
7500
|
+
except OSError:
|
|
7501
|
+
pass
|
|
7429
7502
|
fcontents.close()
|
|
7430
7503
|
return fp
|
|
7431
7504
|
|
|
@@ -7458,6 +7531,16 @@ if(py7zr_support):
|
|
|
7458
7531
|
VerbosePrintOut("Bad file found!")
|
|
7459
7532
|
numfiles = int(len(szpfp.list()))
|
|
7460
7533
|
AppendFileHeader(fp, numfiles, "UTF-8", [], checksumtype[0], formatspecs)
|
|
7534
|
+
try:
|
|
7535
|
+
fp.flush()
|
|
7536
|
+
if(hasattr(os, "sync")):
|
|
7537
|
+
os.fsync(fp.fileno())
|
|
7538
|
+
except io.UnsupportedOperation:
|
|
7539
|
+
pass
|
|
7540
|
+
except AttributeError:
|
|
7541
|
+
pass
|
|
7542
|
+
except OSError:
|
|
7543
|
+
pass
|
|
7461
7544
|
for member in sorted(szpfp.list(), key=lambda x: x.filename):
|
|
7462
7545
|
fencoding = "UTF-8"
|
|
7463
7546
|
if(re.findall("^[.|/]", member.filename)):
|
|
@@ -7596,10 +7679,20 @@ if(py7zr_support):
|
|
|
7596
7679
|
fcsize, fuid, funame, fgid, fgname, fcurfid, fcurinode, flinkcount, fdev, fdev_minor, fdev_major, "+"+str(len(formatspecs['format_delimiter']))]
|
|
7597
7680
|
AppendFileHeaderWithContent(
|
|
7598
7681
|
fp, tmpoutlist, extradata, jsondata, fcontents.read(), [checksumtype[1], checksumtype[2], checksumtype[3]], formatspecs)
|
|
7682
|
+
try:
|
|
7683
|
+
fp.flush()
|
|
7684
|
+
if(hasattr(os, "sync")):
|
|
7685
|
+
os.fsync(fp.fileno())
|
|
7686
|
+
except io.UnsupportedOperation:
|
|
7687
|
+
pass
|
|
7688
|
+
except AttributeError:
|
|
7689
|
+
pass
|
|
7690
|
+
except OSError:
|
|
7691
|
+
pass
|
|
7599
7692
|
fcontents.close()
|
|
7600
7693
|
return fp
|
|
7601
7694
|
|
|
7602
|
-
def AppendListsWithContent(inlist, fp, dirlistfromtxt=False,
|
|
7695
|
+
def AppendListsWithContent(inlist, fp, dirlistfromtxt=False, extradata=[], jsondata={}, compression="auto", compresswholefile=True, compressionlevel=None, followlink=False, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_dict__, verbose=False):
|
|
7603
7696
|
if(not hasattr(fp, "write")):
|
|
7604
7697
|
return False
|
|
7605
7698
|
if(verbose):
|
|
@@ -7661,12 +7754,12 @@ def AppendListsWithContent(inlist, fp, dirlistfromtxt=False, filevalues=[], extr
|
|
|
7661
7754
|
return fp
|
|
7662
7755
|
|
|
7663
7756
|
|
|
7664
|
-
def AppendInFileWithContent(infile, fp, dirlistfromtxt=False,
|
|
7757
|
+
def AppendInFileWithContent(infile, fp, dirlistfromtxt=False, extradata=[], jsondata={}, followlink=False, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_dict__, verbose=False):
|
|
7665
7758
|
inlist = ReadInFileWithContentToList(infile, "auto", 0, 0, False, False, True, False, formatspecs)
|
|
7666
|
-
return AppendListsWithContent(inlist, fp, dirlistfromtxt,
|
|
7759
|
+
return AppendListsWithContent(inlist, fp, dirlistfromtxt, extradata, jsondata, followlink, checksumtype, formatspecs, verbose)
|
|
7667
7760
|
|
|
7668
7761
|
|
|
7669
|
-
def AppendFilesWithContentToOutFile(infiles, outfile, dirlistfromtxt=False, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt,
|
|
7762
|
+
def AppendFilesWithContentToOutFile(infiles, outfile, dirlistfromtxt=False, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, extradata=[], jsondata={}, followlink=False, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False):
|
|
7670
7763
|
if(IsNestedDict(formatspecs) and fmttype=="auto" and
|
|
7671
7764
|
(outfile != "-" and outfile is not None and not hasattr(outfile, "read") and not hasattr(outfile, "write"))):
|
|
7672
7765
|
get_in_ext = os.path.splitext(outfile)
|
|
@@ -7710,7 +7803,7 @@ def AppendFilesWithContentToOutFile(infiles, outfile, dirlistfromtxt=False, fmtt
|
|
|
7710
7803
|
fp = CompressOpenFile(outfile, compresswholefile, compressionlevel)
|
|
7711
7804
|
except PermissionError:
|
|
7712
7805
|
return False
|
|
7713
|
-
AppendFilesWithContent(infiles, fp, dirlistfromtxt,
|
|
7806
|
+
AppendFilesWithContent(infiles, fp, dirlistfromtxt, extradata, jsondata, compression,
|
|
7714
7807
|
compresswholefile, compressionlevel, compressionuselist, followlink, checksumtype, formatspecs, verbose)
|
|
7715
7808
|
if(outfile == "-" or outfile is None or hasattr(outfile, "read") or hasattr(outfile, "write")):
|
|
7716
7809
|
fp = CompressOpenFileAlt(
|
|
@@ -7747,12 +7840,12 @@ def AppendFilesWithContentToOutFile(infiles, outfile, dirlistfromtxt=False, fmtt
|
|
|
7747
7840
|
fp.close()
|
|
7748
7841
|
return True
|
|
7749
7842
|
|
|
7750
|
-
def AppendFilesWithContentToStackedOutFile(infiles, outfile, dirlistfromtxt=False, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt,
|
|
7843
|
+
def AppendFilesWithContentToStackedOutFile(infiles, outfile, dirlistfromtxt=False, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, extradata=[], jsondata={}, followlink=False, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False):
|
|
7751
7844
|
if not isinstance(infiles, list):
|
|
7752
7845
|
infiles = [infiles]
|
|
7753
7846
|
returnout = False
|
|
7754
7847
|
for infileslist in infiles:
|
|
7755
|
-
returnout = AppendFilesWithContentToOutFile(infileslist, outfile, dirlistfromtxt, fmttype, compression, compresswholefile, compressionlevel, compressionuselist,
|
|
7848
|
+
returnout = AppendFilesWithContentToOutFile(infileslist, outfile, dirlistfromtxt, fmttype, compression, compresswholefile, compressionlevel, compressionuselist, extradata, jsondata, followlink, checksumtype, formatspecs, verbose, True)
|
|
7756
7849
|
if(not returnout):
|
|
7757
7850
|
break
|
|
7758
7851
|
else:
|
|
@@ -7762,7 +7855,7 @@ def AppendFilesWithContentToStackedOutFile(infiles, outfile, dirlistfromtxt=Fals
|
|
|
7762
7855
|
return True
|
|
7763
7856
|
return returnout
|
|
7764
7857
|
|
|
7765
|
-
def AppendListsWithContentToOutFile(inlist, outfile, dirlistfromtxt=False, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None,
|
|
7858
|
+
def AppendListsWithContentToOutFile(inlist, outfile, dirlistfromtxt=False, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, extradata=[], jsondata={}, followlink=False, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_dict__, verbose=False, returnfp=False):
|
|
7766
7859
|
if(IsNestedDict(formatspecs) and fmttype=="auto" and
|
|
7767
7860
|
(outfile != "-" and outfile is not None and not hasattr(outfile, "read") and not hasattr(outfile, "write"))):
|
|
7768
7861
|
get_in_ext = os.path.splitext(outfile)
|
|
@@ -7803,7 +7896,7 @@ def AppendListsWithContentToOutFile(inlist, outfile, dirlistfromtxt=False, fmtty
|
|
|
7803
7896
|
fp = CompressOpenFile(outfile, compresswholefile, compressionlevel)
|
|
7804
7897
|
except PermissionError:
|
|
7805
7898
|
return False
|
|
7806
|
-
AppendListsWithContent(inlist, fp, dirlistfromtxt,
|
|
7899
|
+
AppendListsWithContent(inlist, fp, dirlistfromtxt, extradata, jsondata, compression,
|
|
7807
7900
|
compresswholefile, compressionlevel, followlink, checksumtype, formatspecs, verbose)
|
|
7808
7901
|
if(outfile == "-" or outfile is None or hasattr(outfile, "read") or hasattr(outfile, "write")):
|
|
7809
7902
|
fp = CompressOpenFileAlt(
|
|
@@ -7921,6 +8014,21 @@ def AppendFilesWithContentFromTarFileToOutFile(infiles, outfile, fmttype="auto",
|
|
|
7921
8014
|
fp.close()
|
|
7922
8015
|
return True
|
|
7923
8016
|
|
|
8017
|
+
def AppendFilesWithContentFromTarFileToStackedOutFile(infiles, outfile, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, extradata=[], jsondata={}, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False):
|
|
8018
|
+
if not isinstance(infiles, list):
|
|
8019
|
+
infiles = [infiles]
|
|
8020
|
+
returnout = False
|
|
8021
|
+
for infileslist in infiles:
|
|
8022
|
+
returnout = AppendFilesWithContentFromTarFileToOutFile(infileslist, outfile, fmttype, compression, compresswholefile, compressionlevel, compressionuselist, extradata, jsondata, checksumtype, formatspecs, verbose, True)
|
|
8023
|
+
if(not returnout):
|
|
8024
|
+
break
|
|
8025
|
+
else:
|
|
8026
|
+
outfile = returnout
|
|
8027
|
+
if(not returnfp and returnout):
|
|
8028
|
+
returnout.close()
|
|
8029
|
+
return True
|
|
8030
|
+
return returnout
|
|
8031
|
+
|
|
7924
8032
|
def AppendFilesWithContentFromZipFileToOutFile(infiles, outfile, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, extradata=[], jsondata={}, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False):
|
|
7925
8033
|
if(IsNestedDict(formatspecs) and fmttype=="auto" and
|
|
7926
8034
|
(outfile != "-" and outfile is not None and not hasattr(outfile, "read") and not hasattr(outfile, "write"))):
|
|
@@ -8001,6 +8109,21 @@ def AppendFilesWithContentFromZipFileToOutFile(infiles, outfile, fmttype="auto",
|
|
|
8001
8109
|
fp.close()
|
|
8002
8110
|
return True
|
|
8003
8111
|
|
|
8112
|
+
def AppendFilesWithContentFromZipFileToStackedOutFile(infiles, outfile, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, extradata=[], jsondata={}, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False):
|
|
8113
|
+
if not isinstance(infiles, list):
|
|
8114
|
+
infiles = [infiles]
|
|
8115
|
+
returnout = False
|
|
8116
|
+
for infileslist in infiles:
|
|
8117
|
+
returnout = AppendFilesWithContentFromZipFileToOutFile(infileslist, outfile, fmttype, compression, compresswholefile, compressionlevel, compressionuselist, extradata, jsondata, checksumtype, formatspecs, verbose, True)
|
|
8118
|
+
if(not returnout):
|
|
8119
|
+
break
|
|
8120
|
+
else:
|
|
8121
|
+
outfile = returnout
|
|
8122
|
+
if(not returnfp and returnout):
|
|
8123
|
+
returnout.close()
|
|
8124
|
+
return True
|
|
8125
|
+
return returnout
|
|
8126
|
+
|
|
8004
8127
|
if(not rarfile_support):
|
|
8005
8128
|
def AppendFilesWithContentFromRarFileToOutFile(infiles, outfile, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, extradata=[], jsondata={}, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False):
|
|
8006
8129
|
return False
|
|
@@ -8086,6 +8209,21 @@ if(rarfile_support):
|
|
|
8086
8209
|
fp.close()
|
|
8087
8210
|
return True
|
|
8088
8211
|
|
|
8212
|
+
def AppendFilesWithContentFromRarFileToStackedOutFile(infiles, outfile, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, extradata=[], jsondata={}, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False):
|
|
8213
|
+
if not isinstance(infiles, list):
|
|
8214
|
+
infiles = [infiles]
|
|
8215
|
+
returnout = False
|
|
8216
|
+
for infileslist in infiles:
|
|
8217
|
+
returnout = AppendFilesWithContentFromRarFileToOutFile(infileslist, outfile, fmttype, compression, compresswholefile, compressionlevel, compressionuselist, extradata, jsondata, checksumtype, formatspecs, verbose, True)
|
|
8218
|
+
if(not returnout):
|
|
8219
|
+
break
|
|
8220
|
+
else:
|
|
8221
|
+
outfile = returnout
|
|
8222
|
+
if(not returnfp and returnout):
|
|
8223
|
+
returnout.close()
|
|
8224
|
+
return True
|
|
8225
|
+
return returnout
|
|
8226
|
+
|
|
8089
8227
|
if(not py7zr_support):
|
|
8090
8228
|
def AppendFilesWithContentFromSevenZipToOutFile(infiles, outfile, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, extradata=[], jsondata={}, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False):
|
|
8091
8229
|
return False
|
|
@@ -8171,9 +8309,24 @@ if(py7zr_support):
|
|
|
8171
8309
|
fp.close()
|
|
8172
8310
|
return True
|
|
8173
8311
|
|
|
8174
|
-
def
|
|
8312
|
+
def AppendFilesWithContentFromSevenZipToStackedOutFile(infiles, outfile, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, extradata=[], jsondata={}, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False):
|
|
8313
|
+
if not isinstance(infiles, list):
|
|
8314
|
+
infiles = [infiles]
|
|
8315
|
+
returnout = False
|
|
8316
|
+
for infileslist in infiles:
|
|
8317
|
+
returnout = AppendFilesWithContentFromSevenZipToOutFile(infileslist, outfile, fmttype, compression, compresswholefile, compressionlevel, compressionuselist, extradata, jsondata, checksumtype, formatspecs, verbose, True)
|
|
8318
|
+
if(not returnout):
|
|
8319
|
+
break
|
|
8320
|
+
else:
|
|
8321
|
+
outfile = returnout
|
|
8322
|
+
if(not returnfp and returnout):
|
|
8323
|
+
returnout.close()
|
|
8324
|
+
return True
|
|
8325
|
+
return returnout
|
|
8326
|
+
|
|
8327
|
+
def AppendInFileWithContentToOutFile(infile, outfile, dirlistfromtxt=False, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, extradata=[], jsondata={}, followlink=False, checksumtype=["crc32", "crc32", "crc32", "crc32"], formatspecs=__file_format_dict__, verbose=False, returnfp=False):
|
|
8175
8328
|
inlist = ReadInFileWithContentToList(infile, "auto", 0, 0, False, False, True, False, formatspecs)
|
|
8176
|
-
return AppendListsWithContentToOutFile(inlist, outfile, dirlistfromtxt, fmttype, compression, compresswholefile, compressionlevel,
|
|
8329
|
+
return AppendListsWithContentToOutFile(inlist, outfile, dirlistfromtxt, fmttype, compression, compresswholefile, compressionlevel, extradata, jsondata, followlink, checksumtype, formatspecs, verbose, returnfp)
|
|
8177
8330
|
|
|
8178
8331
|
|
|
8179
8332
|
def PrintPermissionString(fchmode, ftype):
|
|
@@ -9949,10 +10102,10 @@ def CheckSumSupportAlt(checkfor, guaranteed=True):
|
|
|
9949
10102
|
|
|
9950
10103
|
|
|
9951
10104
|
def PackArchiveFile(infiles, outfile, dirlistfromtxt=False, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, followlink=False, checksumtype=["crc32", "crc32", "crc32", "crc32"], extradata=[], jsondata={}, formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False):
|
|
9952
|
-
return AppendFilesWithContentToOutFile(infiles, outfile, dirlistfromtxt, fmttype, compression, compresswholefile, compressionlevel, compressionuselist,
|
|
10105
|
+
return AppendFilesWithContentToOutFile(infiles, outfile, dirlistfromtxt, fmttype, compression, compresswholefile, compressionlevel, compressionuselist, extradata, jsondata, followlink, checksumtype, formatspecs, verbose, returnfp)
|
|
9953
10106
|
|
|
9954
10107
|
def PackStackedArchiveFile(infiles, outfile, dirlistfromtxt=False, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, followlink=False, checksumtype=["crc32", "crc32", "crc32", "crc32"], extradata=[], jsondata={}, formatspecs=__file_format_multi_dict__, verbose=False, returnfp=False):
|
|
9955
|
-
return AppendFilesWithContentToStackedOutFile(infiles, outfile, dirlistfromtxt, fmttype, compression, compresswholefile, compressionlevel, compressionuselist,
|
|
10108
|
+
return AppendFilesWithContentToStackedOutFile(infiles, outfile, dirlistfromtxt, fmttype, compression, compresswholefile, compressionlevel, compressionuselist, extradata, jsondata, followlink, checksumtype, formatspecs, verbose, returnfp)
|
|
9956
10109
|
|
|
9957
10110
|
def PackArchiveFileFromDirList(infiles, outfile, dirlistfromtxt=False, fmttype="auto", compression="auto", compresswholefile=True, compressionlevel=None, compressionuselist=compressionlistalt, followlink=False, checksumtype=["crc32", "crc32", "crc32"], extradata=[], formatspecs=__file_format_dict__, verbose=False, returnfp=False):
|
|
9958
10111
|
return PackArchiveFile(infiles, outfile, dirlistfromtxt, fmttype, compression, compresswholefile, compressionlevel, compressionuselist, followlink, checksumtype, extradata, formatspecs, verbose, returnfp)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|