[elbe-devel] [PATCH v2 18/22] filesystem: add readlink function

Bastian Germann bage at linutronix.de
Tue Jul 2 17:19:13 CEST 2019


> prepare to read links in /usr/share/docs
> 
> its not necessary to translare absolute links, because only relative links

translate

> will be evaluated.
> 
> For absolute links, there is Filesystem.realpath()
> 
> Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>

With this applied
Reviewed-by: Bastian Germann <bage 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)
> 



More information about the elbe-devel mailing list