Added a bunch of stuff
This commit is contained in:
21
deemix/utils/localpaths.py
Normal file
21
deemix/utils/localpaths.py
Normal file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
import os.path as path
|
||||
from os import getenv
|
||||
|
||||
userdata = ""
|
||||
homedata = path.expanduser("~")
|
||||
|
||||
if getenv("APPDATA"):
|
||||
userdata = getenv("APPDATA") + path.sep + "deemix" + path.sep
|
||||
elif sys.platform.startswith('darwin'):
|
||||
userdata = homedata + '/Library/Application Support/deemix/'
|
||||
elif getenv("XDG_CONFIG_HOME"):
|
||||
userdata = getenv("XDG_CONFIG_HOME") + '/deemix/';
|
||||
else:
|
||||
userdata = homedata + '/.config/deemix/';
|
||||
|
||||
def getHomeFolder():
|
||||
return homedata
|
||||
def getConfigFolder():
|
||||
return userdata
|
Reference in New Issue
Block a user