Get an item's data path.
436389
def datapath(self):
        
        path = self._fields['path']
        if not path:  # stopped item with no base_dir?
            path = self.fetch('directory')
            if path and not self._fields['is_multi_file']:
                path = os.path.join(path, self._fields['name'])
        return os.path.expanduser(fmt.to_unicode(path))
894955
def get(self, path, data=None):
        """"""
        data = data or {}
        response = requests.get(self.url(path), params=data, headers=self.request_header())
        return self.parse_response(response)
1305080
def get_pkg_path(self, item):
        
        if not isinstance(item, str):
            return None

        parts = urlsplit(item)
        if parts.scheme == 'pkg' and parts.netloc:
            return (parts.netloc, parts.path)

        return None
1325017
def get_path(self, i):
        """"""
        index = (i - 1) // 2
        reverse = (i - 1) % 2
        path = self.paths[index]
        if reverse:
            return path.reversed()
        else:
            return path
337531
def __item_data(self, model, index):
        """"""
        item = model.items[index]

        data = {
            "name": item.name,
            "data": item.data,
            "doc": getattr(item, "doc", None),
            "path": getattr(item, "path", None),
        }

        return data
755772
def determine_path():
    """"""
    root = __file__
    if os.path.islink(root):
        root = os.path.realpath(root)
    return os.path.dirname(os.path.abspath(root))
12166
def GetDataByPath(self, path):
    
    _, path_data = self._paths.get(path, (None, None))
    return path_data
1215717
def get_path():
    '''
    
    '''
    ret = salt.utils.stringutils.to_unicode(
        __utils__['reg.read_value'](
            'HKEY_LOCAL_MACHINE',
            'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment',
            'PATH')['vdata']
    ).split(';')

    # Trim ending backslash
    return list(map(_normalize_dir, ret))
16937
def _get(self):
        """"""

        data, stat = self.zk.get(self.path)
        if not len(data):
            return {}, stat.version
        if self.OLD_SEPARATOR in data:
            return self._get_old()
        return json.loads(data), stat.version
484312
def get_data_path(filename):
    
    if os.path.isabs(filename):
        return filename
    else:
        return os.path.join(get_data_dir(), filename)
472875
def get_path(self, key):
        ""
        if key in self.keys():
            return (key,), self[key]
        else:
            key_path, res = (None, None)
            for sub_key, v in self.items():
                if isinstance(v, self.__class__):
                    key_path, res = v.get_path(key)
                elif hasattr(v, 'get'):
                    res = v.get(key)
                    key_path = (key,) if res is not None else None
                if res is not None and key_path is not None:
                    key_path = (sub_key,) + key_path
                    break
            return key_path, res
1264650
def findByPath(self, rel, path):
        """"""
        if((path=="") or (path=="/")):
            return(self)
        (front,dummy,rest) = path.lstrip("/").partition("/")
        for child in self.items:
            if front in child.values(rel):
                return child.findByPath(rel, rest)
        return None
482415
def CollectionItemToAff4Path(item, client_id=None):
  """"""
  if isinstance(item, rdf_flows.GrrMessage):
    client_id = item.source
    item = item.payload
  elif isinstance(item, rdf_flow_objects.FlowResult):
    client_id = item.client_id
    item = item.payload

  if not client_id:
    raise ValueError("Could not determine client_id.")
  elif isinstance(client_id, string_types):
    client_id = rdf_client.ClientURN(client_id)

  if isinstance(item, rdf_client_fs.StatEntry):
    return item.AFF4Path(client_id)
  elif isinstance(item, rdf_file_finder.FileFinderResult):
    return item.stat_entry.AFF4Path(client_id)
  elif isinstance(item, collectors.ArtifactFilesDownloaderResult):
    if item.HasField("downloaded_file"):
      return item.downloaded_file.AFF4Path(client_id)

  raise ItemNotExportableError(item)
637618
def _get_path(self, file):
        """"""
        dir = self._cache_directory()
        if not os.path.exists(dir):
            os.makedirs(dir)
        return os.path.join(dir, file)
207201
function getFromPath(obj, path){
		path = path.split('.');

		for(var i = 0, l = path.length; i < l; i++){
			if (hasOwnProperty.call(obj, path[i]))
				obj = obj[path[i]];
			
			else
				return undefined;
		}
		
		return obj;
	}
773824
def path(self):
        """"""
        self._path = ''
        path_args = self.path_args
        path = "/{}".format("/".join(path_args))
        return path
1023470
def _get_result_paths(self,data):
        
        result = {}
        result['Tree'] = ResultPath(Path=splitext(self._input_filename)[0] + \
                                                  '.tree')
        return result