summaryrefslogtreecommitdiffstats
path: root/module/utils/fs.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-12-14 18:43:03 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-12-14 18:43:03 +0100
commitc36736997b7c0a0e6cc2cbb426f49b486b78a171 (patch)
treef9588cac0b9f931dfbe733d49eb68ded9f602587 /module/utils/fs.py
parentmerge setup to default (diff)
downloadpyload-c36736997b7c0a0e6cc2cbb426f49b486b78a171.tar.xz
cleaned setup
Diffstat (limited to 'module/utils/fs.py')
-rw-r--r--module/utils/fs.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/module/utils/fs.py b/module/utils/fs.py
index 1894bc49a..92cc605e7 100644
--- a/module/utils/fs.py
+++ b/module/utils/fs.py
@@ -26,6 +26,12 @@ def chmod(path, mode):
except :
pass
+def dirname(path):
+ return fs_decode(os.path.dirname(fs_encode(path)))
+
+def abspath(path):
+ return fs_decode(os.path.abspath(fs_encode(path)))
+
def chown(path, uid, gid):
return os.chown(fs_encode(path), uid, gid)
@@ -40,7 +46,7 @@ def makedirs(path, mode=0755):
# fs_decode?
def listdir(path):
- return os.listdir(fs_encode(path))
+ return [fs_decode(x) for x in os.listdir(fs_encode(path))]
def save_filename(name):
#remove some chars