@Test public void testReadDirectory() { List<String> dirs = Arrays.asList(client.readDirectory("/")); System.out.println(dirs); assertFalse(dirs.isEmpty()); assertTrue(dirs.contains("Books")); assertTrue(dirs.contains("DCIM")); assertTrue(dirs.contains("Safari")); }
public String[] readDirectory(String dir) { if (dir == null) { throw new NullPointerException("dir"); } StringArrayOut listOut = new StringArrayOut(); try { checkResult(LibIMobileDevice.afc_read_directory(getRef(), dir, listOut)); StringArray list = listOut.getValue(); ArrayList<String> result = new ArrayList<String>(); if (list != null) { for (int i = 0;; i++) { String s = list.get(i); if (s == null) { break; } result.add(s); } } return result.toArray(new String[result.size()]); } finally { LibIMobileDevice.delete_StringArray_values_z(listOut.getValue()); listOut.delete(); } }
AfcClient implements AutoCloseable { public String[] readDirectory(String dir) { if (dir == null) { throw new NullPointerException("dir"); } StringArrayOut listOut = new StringArrayOut(); try { checkResult(LibIMobileDevice.afc_read_directory(getRef(), dir, listOut)); StringArray list = listOut.getValue(); ArrayList<String> result = new ArrayList<String>(); if (list != null) { for (int i = 0;; i++) { String s = list.get(i); if (s == null) { break; } result.add(s); } } return result.toArray(new String[result.size()]); } finally { LibIMobileDevice.delete_StringArray_values_z(listOut.getValue()); listOut.delete(); } } }
AfcClient implements AutoCloseable { public String[] readDirectory(String dir) { if (dir == null) { throw new NullPointerException("dir"); } StringArrayOut listOut = new StringArrayOut(); try { checkResult(LibIMobileDevice.afc_read_directory(getRef(), dir, listOut)); StringArray list = listOut.getValue(); ArrayList<String> result = new ArrayList<String>(); if (list != null) { for (int i = 0;; i++) { String s = list.get(i); if (s == null) { break; } result.add(s); } } return result.toArray(new String[result.size()]); } finally { LibIMobileDevice.delete_StringArray_values_z(listOut.getValue()); listOut.delete(); } } AfcClient(AfcClientRef ref);  AfcClient(IDevice device, LockdowndServiceDescriptor service); }
AfcClient implements AutoCloseable { public String[] readDirectory(String dir) { if (dir == null) { throw new NullPointerException("dir"); } StringArrayOut listOut = new StringArrayOut(); try { checkResult(LibIMobileDevice.afc_read_directory(getRef(), dir, listOut)); StringArray list = listOut.getValue(); ArrayList<String> result = new ArrayList<String>(); if (list != null) { for (int i = 0;; i++) { String s = list.get(i); if (s == null) { break; } result.add(s); } } return result.toArray(new String[result.size()]); } finally { LibIMobileDevice.delete_StringArray_values_z(listOut.getValue()); listOut.delete(); } } AfcClient(AfcClientRef ref);  AfcClient(IDevice device, LockdowndServiceDescriptor service); String[] readDirectory(String dir); Map<String, String> getDeviceInfo(); int getBlockSize(); long getFreeBytes(); long getTotalBytes(); String getModel(); Map<String, String> getFileInfo(String path); long fileOpen(String path, AfcFileMode mode); void fileClose(long handle); int fileRead(long handle, byte[] buffer, int offset, int count); int fileWrite(long handle, byte[] buffer, int offset, int count); void fileCopy(File localFile, String remoteFile); void removePath(String path); void removePath(String path, boolean recurse); void renamePath(String from, String to); void makeDirectory(String dir); void makeLink(AfcLinkType type, String target, String source); void upload(File localFile, final String targetPath); void upload(File localFile, final String targetPath, 
            final UploadProgressCallback callback); synchronized void dispose(); @Override void close(); static void main(String[] args); }
AfcClient implements AutoCloseable { public String[] readDirectory(String dir) { if (dir == null) { throw new NullPointerException("dir"); } StringArrayOut listOut = new StringArrayOut(); try { checkResult(LibIMobileDevice.afc_read_directory(getRef(), dir, listOut)); StringArray list = listOut.getValue(); ArrayList<String> result = new ArrayList<String>(); if (list != null) { for (int i = 0;; i++) { String s = list.get(i); if (s == null) { break; } result.add(s); } } return result.toArray(new String[result.size()]); } finally { LibIMobileDevice.delete_StringArray_values_z(listOut.getValue()); listOut.delete(); } } AfcClient(AfcClientRef ref);  AfcClient(IDevice device, LockdowndServiceDescriptor service); String[] readDirectory(String dir); Map<String, String> getDeviceInfo(); int getBlockSize(); long getFreeBytes(); long getTotalBytes(); String getModel(); Map<String, String> getFileInfo(String path); long fileOpen(String path, AfcFileMode mode); void fileClose(long handle); int fileRead(long handle, byte[] buffer, int offset, int count); int fileWrite(long handle, byte[] buffer, int offset, int count); void fileCopy(File localFile, String remoteFile); void removePath(String path); void removePath(String path, boolean recurse); void renamePath(String from, String to); void makeDirectory(String dir); void makeLink(AfcLinkType type, String target, String source); void upload(File localFile, final String targetPath); void upload(File localFile, final String targetPath, 
            final UploadProgressCallback callback); synchronized void dispose(); @Override void close(); static void main(String[] args); static final String SERVICE_NAME; static final String DEVICE_INFO_KEY_FS_TOTAL_BYTES; static final String DEVICE_INFO_KEY_FS_FREE_BYTES; static final String DEVICE_INFO_KEY_FS_BLOCK_SIZE; static final String DEVICE_INFO_KEY_MODEL; static final String FILE_INFO_KEY_ST_BIRTHTIME; static final String FILE_INFO_KEY_ST_MTIME; static final String FILE_INFO_KEY_ST_BLOCKS; static final String FILE_INFO_KEY_ST_NLINK; static final String FILE_INFO_KEY_ST_SIZE; static final String FILE_INFO_KEY_ST_IFMT; static final String FILE_INFO_KEY_LINK_TARGET; }