def get_relative_path(self, root):
        """
        Gets the fragment of the current path starting at root.
        """
        if self.path == root:
            return ''
        ancestors = self.ancestors(stop=root)
        return functools.reduce(lambda f, p: Folder(p.name).child(f),
                                ancestors,
                                self.name)
def get_relative_path ( self , root ) : if self . path == root : return '' ancestors = self . ancestors ( stop = root ) return functools . reduce ( lambda f , p : Folder ( p . name ) . child ( f ) , ancestors , self . name )
Gets the fragment of the current path starting at root.