Home | History | Annotate | Download | only in android

Lines Matching refs:device_path

1168       host_device_tuples: A list of (host_path, device_path) tuples, where
1170 that should be minimially pushed to the device, and |device_path| is
1209 def _GetChangedAndStaleFiles(self, host_path, device_path, track_stale=False):
1214 device_path: an absolute path of a file or directory on the device
1221 3rd element: a list of stale files under device_path, or [] when
1228 device_path = device_path.rstrip('/')
1230 specific_device_paths = [device_path]
1237 posixpath.join(device_path, relative_dir, f) for f in filenames)
1244 cache_entry = self._cache['device_path_checksums'].get(device_path)
1251 self._cache['device_path_checksums'][device_path] = cache_entry
1259 return ([(host_path, device_path)], [], [], lambda: 0)
1266 device_checksum = device_checksums.get(device_path)
1270 to_push.append((host_path, device_path))
1274 device_path, os.path.relpath(host_abs_path, host_path))
1283 new_sums = {posixpath.join(device_path, path[len(host_path) + 1:]): val
1286 self._cache['device_path_checksums'][device_path] = cache_entry
1424 for host_path, device_path in host_device_tuples:
1425 zip_utils.WriteToZipFile(zip_file, host_path, device_path)
1429 def FileExists(self, device_path, timeout=None, retries=None):
1434 return self.PathExists(device_path, timeout=timeout, retries=retries)
1441 device_path: A string containing the absolute path to the file on the
1468 def PullFile(self, device_path, host_path, timeout=None, retries=None):
1472 device_path: A string containing the absolute path of the file to pull
1487 self.adb.Pull(device_path, host_path)
1489 def _ReadFileWithPull(self, device_path):
1493 self.adb.Pull(device_path, host_temp_path)
1501 def ReadFile(self, device_path, as_root=False, force_pull=False,
1506 device_path: A string containing the absolute path of the file to read
1517 The contents of |device_path| as a string. Contents are intepreted using
1530 and 0 < get_size(device_path) <= self._MAX_ADB_OUTPUT_LENGTH):
1532 ['cat', device_path], as_root=as_root, check_return=True))
1536 cmd_helper.SingleQuote(device_path),
1541 return self._ReadFileWithPull(device_path)
1543 def _WriteFileWithPush(self, device_path, contents):
1547 self.adb.Push(host_temp.name, device_path)
1550 def WriteFile(self, device_path, contents, as_root=False, force_push=False,
1555 device_path: A string containing the absolute path to the file to write
1575 cmd_helper.SingleQuote(device_path))
1585 self.RunShellCommand(['cp', device_temp.name, device_path],
1589 self._WriteFileWithPush(device_path, contents)
1591 def _ParseLongLsOutput(self, device_path, as_root=False, **kwargs):
1593 device_path = posixpath.join(device_path, '') # Force trailing '/'.
1595 ['ls', '-a', '-l', device_path], as_root=as_root,
1611 def ListDirectory(self, device_path, as_root=False, **kwargs):
1619 device_path: A string containing the path of the directory on the device
1630 AdbCommandFailedError if |device_path| does not specify a valid and
1635 entries = self._ParseLongLsOutput(device_path, as_root=as_root, **kwargs)
1638 def StatDirectory(self, device_path, as_root=False, **kwargs):
1651 device_path: A string containing the path of the directory on the device
1673 AdbCommandFailedError if |device_path| does not specify a valid and
1678 entries = self._ParseLongLsOutput(device_path, as_root=as_root, **kwargs)
1693 def StatPath(self, device_path, as_root=False, **kwargs):
1697 device_path: A string containing the path of a file or directory from
1708 CommandFailedError if device_path cannot be found on the device.
1712 dirname, filename = posixpath.split(posixpath.normpath(device_path))
1717 'Cannot find file or directory: %r' % device_path, str(self))
1719 def FileSize(self, device_path, as_root=False, **kwargs):
1727 device_path: A string containing the path of a file on the device.
1737 CommandFailedError if device_path cannot be found on the device, or
1742 entry = self.StatPath(device_path, as_root=as_root, **kwargs)
1747 'Could not determine the size of: %s' % device_path, str(self))
2210 # Map of device_path -> [ignore_other_files, map of path->checksum]