+# -*- coding: utf-8 -*-
import os
SCOPE_TRANSPONDERDATA = 0
if base[0:2] == "~/":
# you can only use the ~/ if we have a prefix directory
assert path_prefix is not None
- base = path_prefix + base[2:]
+ base = os.path.join(path_prefix, base[2:])
# don't resolve absolute paths
if base[0:1] == '/':
def pathExists(path):
return os.path.exists(path)
+def createDir(path):
+ try:
+ os.mkdir(path)
+ except:
+ ret = 0
+ else:
+ ret = 1
+ return ret
+
def fileExists(f):
try:
file = open(f)
def InitFallbackFiles():
resolveFilename(SCOPE_CONFIG, "userbouquet.favourites.tv")
resolveFilename(SCOPE_CONFIG, "bouquets.tv")
+ resolveFilename(SCOPE_CONFIG, "userbouquet.favourites.radio")
+ resolveFilename(SCOPE_CONFIG, "bouquets.radio")