Add file_size() function (#2911)

* Add file_size() function

* Update export.py
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-04-24 01:31:11 +02:00
1 parent 646386ff09
commit 1b1ab4cca2
2 files changed
+10 -4

No files matched your search

+5
View File
@@ -61,6 +61,11 @@ def emojis(str=''):
return str.encode().decode('ascii', 'ignore') if platform.system() == 'Windows' else str
def file_size(file):
# Return file size in MB
return Path(file).stat().st_size / 1e6
def check_online():
# Check internet connectivity
import socket