summaryrefslogtreecommitdiff
path: root/AllAboutData/utils
diff options
context:
space:
mode:
authorRasmus Luha <rasmus.luha@gmail.com>2022-03-16 03:51:41 +0200
committerRasmus Luha <rasmus.luha@gmail.com>2022-03-16 03:51:41 +0200
commit9536dc1dd3c16119ac719453894a5385f9983050 (patch)
tree951ae1b25cab7bc3c31bb1249e878d2342277c65 /AllAboutData/utils
parent8fbcafc6fc2fe274537b297e6eb2473a68150255 (diff)
restructure the project
Diffstat (limited to 'AllAboutData/utils')
-rw-r--r--AllAboutData/utils/osSpecific.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/AllAboutData/utils/osSpecific.py b/AllAboutData/utils/osSpecific.py
new file mode 100644
index 0000000..7caf664
--- /dev/null
+++ b/AllAboutData/utils/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" # ...right?
+
+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")
+