def abspath(self, path):
<EOL>if sys.version_info[<NUM_LIT:0>] >= <NUM_LIT:3>:<EOL><INDENT>from urllib.parse import urlparse<EOL><DEDENT>else:<EOL><INDENT>from urlparse import urlparse<EOL><DEDENT>splitpath = path.split(self._destpath, <NUM_LIT:2>)<EOL>if len(splitpath) > <NUM_LIT:1>:<EOL><INDENT>path = splitpath[<NUM_LIT:1>]<EOL><DEDENT>scheme, netloc, upath, uparams, uquery, ufrag = urlparse(path)<EOL>netloc = self._sanitize_relative_path(netloc)<EOL>upath = self._sanitize_relative_path(upath)<EOL>return os.path.join(self._destpath, netloc, upath)<EOL>
Return absolute path of file in the DataSource directory.

If `path` is an URL, then `abspath` will return either the location
the file exists locally or the location it would exist when opened
using the `open` method.

Parameters
----------
path : str
    Can be a local file or a remote URL.

Returns
-------
out : str
    Complete path, including the `DataSource` destination directory.

Notes
-----
The functionality is based on `os.path.abspath`.