def find_location(self, root, path, prefix=None):
        """
        Finds a requested media file in a location, returning the found
        absolute path (or ``None`` if no match).
        """
        if prefix:
            prefix = '%s%s' % (prefix, os.sep)
            if not path.startswith(prefix):
                return None
            path = path[len(prefix):]
        path = safe_join(root, path)
        if os.path.exists(path):
            return path
def find_location(self, root, path, prefix=None):
        """
        Finds a requested media file in a location, returning the found
        absolute path (or ``None`` if no match).
        """
        if prefix:
            prefix = '%s%s' % (prefix, os.sep)
            if not path.startswith(prefix):
                return None
            path = path[len(prefix):]
        path = safe_join(root, path)
        if os.path.exists(path):
            return path
def find_location ( self , root , path , prefix = None ) : if prefix : prefix = '%s%s' % ( prefix , os . sep ) if not path . startswith ( prefix ) : return None path = path [ len ( prefix ) : ] path = safe_join ( root , path ) if os . path . exists ( path ) : return path
Finds a requested media file in a location, returning the found
        absolute path (or ``None`` if no match).
Finds a requested media file in a location returning the found absolute path ( or None if no match ) .