shethjenil commited on
Commit
2baca63
·
verified ·
1 Parent(s): 874e570

Upload 2 files

Browse files
Files changed (2) hide show
  1. HIDEFILE.exe +2 -2
  2. HIDEFILE.py +3 -2
HIDEFILE.exe CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7b536de50d9137417d3a70ad6dcdd1e981bd45d60665f436d31b50601b5352f4
3
- size 10083491
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c379f81544fdd9be1d877b6ca4e2dd8fbe63d4ad292cda41adedc16b5d722c8
3
+ size 10083505
HIDEFILE.py CHANGED
@@ -4,11 +4,12 @@ from zipfile import ZipFile , ZIP_DEFLATED
4
  from os import walk , path
5
  from io import BytesIO
6
  def save_zip(directory):
7
- zipf = ZipFile(BytesIO(), 'w', ZIP_DEFLATED)
 
8
  for root, _, files in walk(directory):
9
  for file in files:
10
  zipf.write(path.join(root, file), path.relpath(path.join(root, file), path.join(directory, '.')))
11
- return zipf.getinfo()
12
  def combine_files(main:str, bindfolder:str):
13
  extension = main.split(".")[-1]
14
  open(asksaveasfilename(filetypes=[("HIDDEN FILE",[f"*.{extension}"])],initialfile=f"hidden.{extension}"), 'wb').write(open(main, 'rb').read()+save_zip(bindfolder))
 
4
  from os import walk , path
5
  from io import BytesIO
6
  def save_zip(directory):
7
+ bytes = BytesIO()
8
+ zipf = ZipFile(bytes, 'w', ZIP_DEFLATED)
9
  for root, _, files in walk(directory):
10
  for file in files:
11
  zipf.write(path.join(root, file), path.relpath(path.join(root, file), path.join(directory, '.')))
12
+ return bytes.getvalue()
13
  def combine_files(main:str, bindfolder:str):
14
  extension = main.split(".")[-1]
15
  open(asksaveasfilename(filetypes=[("HIDDEN FILE",[f"*.{extension}"])],initialfile=f"hidden.{extension}"), 'wb').write(open(main, 'rb').read()+save_zip(bindfolder))