src/main/java/com/simpligility/maven/plugins/android/standalonemojos/PullMojo.java
private FileEntry getFileEntry( String filePath, FileListingService fileListingService )
            throws MojoExecutionException
    {
        // static resolution of symlink
        if ( filePath.startsWith( "/sdcard" ) )
        {
            filePath = "/mnt" + filePath;
        }

        String[] destinationPathSegments = StringUtils.split( filePath, "/" );

        FileEntry fileEntry = fileListingService.getRoot();
        for ( String destinationPathSegment : destinationPathSegments )
        {
            // build up file listing cache
            fileListingService.getChildren( fileEntry, true, null );

            fileEntry = fileEntry.findChild( destinationPathSegment );
            if ( fileEntry == null )
            {
                throw new MojoExecutionException( "Cannot execute goal: " + filePath + " does not exist on device." );
            }
        }
        return fileEntry;
    }
private FileEntry getFileEntry( String filePath, FileListingService fileListingService )
            throws MojoExecutionException
    {
        // static resolution of symlink
        if ( filePath.startsWith( "/sdcard" ) )
        {
            filePath = "/mnt" + filePath;
        }

        String[] destinationPathSegments = StringUtils.split( filePath, "/" );

        FileEntry fileEntry = fileListingService.getRoot();
        for ( String destinationPathSegment : destinationPathSegments )
        {
            // build up file listing cache
            fileListingService.getChildren( fileEntry, true, null );

            fileEntry = fileEntry.findChild( destinationPathSegment );
            if ( fileEntry == null )
            {
                throw new MojoExecutionException( "Cannot execute goal: " + filePath + " does not exist on device." );
            }
        }
        return fileEntry;
    }
private FileEntry getFileEntry ( String filePath , FileListingService fileListingService ) throws MojoExecutionException { // static resolution of symlink if ( filePath . startsWith ( "/sdcard" ) ) { filePath = "/mnt" + filePath ; } String [ ] destinationPathSegments = StringUtils . split ( filePath , "/" ) ; FileEntry fileEntry = fileListingService . getRoot ( ) ; for ( String destinationPathSegment : destinationPathSegments ) { // build up file listing cache fileListingService . getChildren ( fileEntry , true , null ) ; fileEntry = fileEntry . findChild ( destinationPathSegment ) ; if ( fileEntry == null ) { throw new MojoExecutionException ( "Cannot execute goal: " + filePath + " does not exist on device." ) ; } } return fileEntry ; }
Retrieves the corresponding {@link FileEntry} on the emulator/device for
a given file path.

If the file path starts with the symlink "sdcard", it will be resolved
statically to "/mnt/sdcard".

@param filePath           path to file or directory on device or emulator
@param fileListingService {@link FileListingService} for retrieving the
{@link FileEntry}
@return a {@link FileEntry} object for the given file path
@throws MojoExecutionException if the file path could not be found on the device
Retrieves the corresponding { @link FileEntry } on the emulator / device for a given file path .