diff options
author | Rasmus Luha <rasmus.luha@gmail.com> | 2022-03-16 02:14:39 +0200 |
---|---|---|
committer | Rasmus Luha <rasmus.luha@gmail.com> | 2022-03-16 02:14:39 +0200 |
commit | d834c529ae6c0c2d99888c23a37752e8de4fb127 (patch) | |
tree | e2620e48244536e9b116469ec2be91e2f9abdd0c /osSpecific.py |
Inital commit / teams Request
Diffstat (limited to 'osSpecific.py')
-rw-r--r-- | osSpecific.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/osSpecific.py b/osSpecific.py new file mode 100644 index 0000000..09f5e59 --- /dev/null +++ b/osSpecific.py @@ -0,0 +1,25 @@ +import os +import sys + +# terminal commands, which are unfortunately os-specific + +def whichOs(): + if sys.platform == "win32": + return "windows" + else: + return "good" # Sorry, not sorry + +def deleteDataDir(): + if whichOs() == "windows": + os.system("rmdir \s Data") + else: + os.system("rm -r Data") + + +def addDataDir(): + if whichOs() == "windows": + os.system("mkdir Data\Players") + else: + os.system("mkdir -p Data/Players") + print("Created new empty Data directory") + |