[elbe-devel] [PATCH v2 18/22] filesystem: add readlink function
Torben Hohn
torben.hohn at linutronix.de
Tue Jul 2 12:55:40 CEST 2019
prepare to read links in /usr/share/docs
its not necessary to translare absolute links, because only relative links
will be evaluated.
For absolute links, there is Filesystem.realpath()
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/filesystem.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/elbepack/filesystem.py b/elbepack/filesystem.py
index 5c766ba4e..e30762506 100644
--- a/elbepack/filesystem.py
+++ b/elbepack/filesystem.py
@@ -88,6 +88,9 @@ class Filesystem(object):
def mkdir(self, path):
os.makedirs(self.fname(path))
+ def readlink(self, path):
+ return os.readlink(self.fname(path))
+
def realpath(self, path):
path = path.split(os.sep)
--
2.11.0
More information about the elbe-devel
mailing list