Tabnine Logo
FileListingService
Code IndexAdd Tabnine to your IDE (free)

How to use
FileListingService
in
com.android.ddmlib

Best Java code snippets using com.android.ddmlib.FileListingService (Showing top 16 results out of 315)

origin: simpligility/android-maven-plugin

FileEntry fileEntry = fileListingService.getRoot();
for ( String destinationPathSegment : destinationPathSegments )
  fileListingService.getChildren( fileEntry, true, null );
origin: simpligility/android-maven-plugin

fileEntries = fileListingService.getChildren( sourceFileEntry, true, null );
origin: stackoverflow.com

 Public FileEntry getEntry(String remotePath, IDevice device){

FileListingService listingService;    
listingService = device.getFileListingService();

FileEntry entry = listingService.getRoot();    
String [ ] segments = remotPath.split("/");

for(String segment : segments){

listingSevice.getChildren(entry, false ,null);    
entry = entry.findChild(sement):

if(entry==null){    
// throw new Exception();
}    
}

return entry;    
}
origin: com.android.tools.ddms/ddmlib

@Override
public FileListingService getFileListingService() {
  return new FileListingService(this);
}
origin: com.android.tools.ddms/ddmlib

doLs(entry);
return entry.getCachedChildren();
origin: com.android.tools.ddms/ddmlib

private void doLs(FileEntry entry) {
  try {
    doLsAndThrow(entry);
  } catch (Exception e) {
    // do nothing
  }
}
origin: com.google.android.tools/ddmlib

/**
 * compute the recursive file size of all the files in the list. Folder
 * have a weight of 1.
 * @param entries
 * @param fls
 * @return
 */
private int getTotalRemoteFileSize(FileEntry[] entries, FileListingService fls) {
  int count = 0;
  for (FileEntry e : entries) {
    int type = e.getType();
    if (type == FileListingService.TYPE_DIRECTORY) {
      // get the children
      FileEntry[] children = fls.getChildren(e, false, null);
      count += getTotalRemoteFileSize(children, fls) + 1;
    } else if (type == FileListingService.TYPE_FILE) {
      count += e.getSizeValue();
    }
  }
  return count;
}
origin: com.google.android.tools/ddmlib

public FileListingService getFileListingService() {
  return new FileListingService(this);
}
origin: com.google.android.tools/ddmlib

doLs(entry);
return entry.getCachedChildren();
origin: com.android.tools.ddms/ddmlib

/**
 * Returns the children of a {@link FileEntry}.
 * <p>
 * This method is the explicit synchronous version of
 * {@link #getChildren(FileEntry, boolean, IListingReceiver)}. It is roughly equivalent to
 * calling
 * getChildren(FileEntry, false, null)
 *
 * @param entry The parent entry.
 * @return The list of children
 * @throws TimeoutException in case of timeout on the connection when sending the command.
 * @throws AdbCommandRejectedException if adb rejects the command.
 * @throws ShellCommandUnresponsiveException in case the shell command doesn't send any output
 *            for a period longer than <var>maxTimeToOutputResponse</var>.
 * @throws IOException in case of I/O error on the connection.
 */
public FileEntry[] getChildrenSync(final FileEntry entry) throws TimeoutException,
    AdbCommandRejectedException, ShellCommandUnresponsiveException, IOException {
  doLsAndThrow(entry);
  return entry.getCachedChildren();
}
origin: gradle.plugin.org.openftc.ftcresourcesplugin/ftcExternalResources

private boolean resourceNeedsSending(WrappedDevice device) {
  FileListingService listingService = device.getFileListingService();
  FileListingService.FileEntry result = listingService.getRoot();
  if(result == null) {
    listingService.getChildren(result, true, null);
    result = result.findChild(segment);
    if (result == null) {
origin: com.android.tools.ddms/ddmlib

/**
 * compute the recursive file size of all the files in the list. Folder
 * have a weight of 1.
 * @param entries
 * @param fls
 * @return
 */
private int getTotalRemoteFileSize(FileEntry[] entries, FileListingService fls) {
  int count = 0;
  for (FileEntry e : entries) {
    int type = e.getType();
    if (type == FileListingService.TYPE_DIRECTORY) {
      // get the children
      FileEntry[] children = fls.getChildren(e, false, null);
      count += getTotalRemoteFileSize(children, fls) + 1;
    } else if (type == FileListingService.TYPE_FILE) {
      count += e.getSizeValue();
    }
  }
  return count;
}
origin: com.android.tools.ddms/ddmlib

FileListingService fls = new FileListingService(mDevice);
origin: com.android.tools.ddms/ddmlib

FileEntry[] children = fileListingService.getChildren(e, true, null);
doPull(children, dest, fileListingService, monitor);
monitor.advance(1);
origin: com.google.android.tools/ddmlib

FileListingService fls = new FileListingService(mDevice);
origin: com.google.android.tools/ddmlib

FileEntry[] children = fileListingService.getChildren(e, true, null);
doPull(children, dest, fileListingService, monitor);
monitor.advance(1);
com.android.ddmlibFileListingService

Javadoc

Provides Device side file listing service.

To get an instance for a known Device, call Device#getFileListingService().

Most used methods

  • getChildren
    Returns the children of a FileEntry. This method supports a cache mechanism and synchronous and asyn
  • getRoot
    Returns the root element.
  • <init>
    Creates a File Listing Service for a specified Device.
  • doLs
  • doLsAndThrow

Popular in Java

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Socket (java.net)
    Provides a client-side TCP socket.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now