Home | History | Annotate | Download | only in android

Lines Matching refs:device_path

1353       host_device_tuples: A list of (host_path, device_path) tuples, where
1355 that should be minimially pushed to the device, and |device_path| is
1414 def _GetChangedAndStaleFiles(self, host_path, device_path, track_stale=False):
1419 device_path: an absolute path of a file or directory on the device
1426 3rd element: a list of stale files under device_path, or [] when
1433 device_path = device_path.rstrip('/')
1435 specific_device_paths = [device_path]
1442 posixpath.join(device_path, relative_dir, f) for f in filenames)
1449 cache_entry = self._cache['device_path_checksums'].get(device_path)
1456 self._cache['device_path_checksums'][device_path] = cache_entry
1464 return ([(host_path, device_path)], [], [], lambda: 0)
1471 device_checksum = device_checksums.get(device_path)
1475 to_push.append((host_path, device_path))
1479 device_path, os.path.relpath(host_abs_path, host_path))
1488 new_sums = {posixpath.join(device_path, path[len(host_path) + 1:]): val
1491 self._cache['device_path_checksums'][device_path] = cache_entry
1627 def FileExists(self, device_path, timeout=None, retries=None):
1632 return self.PathExists(device_path, timeout=timeout, retries=retries)
1639 device_path: A string containing the absolute path to the file on the
1669 def RemovePath(self, device_path, force=False, recursive=False,
1674 device_path: A string containing the absolute path to the file on the
1700 if isinstance(device_path, basestring):
1701 args.append(device_path if not rename else _RenamePath(device_path))
1704 device_path if not rename else [_RenamePath(p) for p in device_path])
1708 def PullFile(self, device_path, host_path, timeout=None, retries=None):
1712 device_path: A string containing the absolute path of the file to pull
1727 self.adb.Pull(device_path, host_path)
1729 def _ReadFileWithPull(self, device_path):
1733 self.adb.Pull(device_path, host_temp_path)
1741 def ReadFile(self, device_path, as_root=False, force_pull=False,
1746 device_path: A string containing the absolute path of the file to read
1757 The contents of |device_path| as a string. Contents are intepreted using
1770 and 0 < get_size(device_path) <= self._MAX_ADB_OUTPUT_LENGTH):
1772 ['cat', device_path], as_root=as_root, check_return=True))
1776 cmd_helper.SingleQuote(device_path),
1781 return self._ReadFileWithPull(device_path)
1783 def _WriteFileWithPush(self, device_path, contents):
1787 self.adb.Push(host_temp.name, device_path)
1790 def WriteFile(self, device_path, contents, as_root=False, force_push=False,
1795 device_path: A string containing the absolute path to the file to write
1815 cmd_helper.SingleQuote(device_path))
1825 self.RunShellCommand(['cp', device_temp.name, device_path],
1829 self._WriteFileWithPush(device_path, contents)
1831 def _ParseLongLsOutput(self, device_path, as_root=False, **kwargs):
1833 device_path = posixpath.join(device_path, '') # Force trailing '/'.
1835 ['ls', '-a', '-l', device_path], as_root=as_root,
1858 def ListDirectory(self, device_path, as_root=False, **kwargs):
1866 device_path: A string containing the path of the directory on the device
1877 AdbCommandFailedError if |device_path| does not specify a valid and
1882 entries = self._ParseLongLsOutput(device_path, as_root=as_root, **kwargs)
1885 def StatDirectory(self, device_path, as_root=False, **kwargs):
1898 device_path: A string containing the path of the directory on the device
1920 AdbCommandFailedError if |device_path| does not specify a valid and
1925 entries = self._ParseLongLsOutput(device_path, as_root=as_root, **kwargs)
1940 def StatPath(self, device_path, as_root=False, **kwargs):
1944 device_path: A string containing the path of a file or directory from
1955 CommandFailedError if device_path cannot be found on the device.
1959 dirname, filename = posixpath.split(posixpath.normpath(device_path))
1964 'Cannot find file or directory: %r' % device_path, str(self))
1966 def FileSize(self, device_path, as_root=False, **kwargs):
1974 device_path: A string containing the path of a file on the device.
1984 CommandFailedError if device_path cannot be found on the device, or
1989 entry = self.StatPath(device_path, as_root=as_root, **kwargs)
1994 'Could not determine the size of: %s' % device_path, str(self))
2528 # Map of device_path -> [ignore_other_files, map of path->checksum]