MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / isConnected

Method isConnected

src/plugins/sftp/src/com/foxdebug/sftp/Sftp.java:747–767  ·  view source on GitHub ↗
(JSONArray args, CallbackContext callback)

Source from the content-addressed store, hash-verified

745 }
746
747 public void isConnected(JSONArray args, CallbackContext callback) {
748 cordova
749 .getThreadPool()
750 .execute(
751 new Runnable() {
752 public void run() {
753 if (
754 ssh != null &&
755 ssh.isConnected() &&
756 sftp != null &&
757 !sftp.isClosed()
758 ) {
759 callback.success(connectionID);
760 return;
761 }
762
763 callback.success(0);
764 }
765 }
766 );
767 }
768
769 public String errMessage(Exception e) {
770 String res = e.getMessage();

Callers

nothing calls this directly

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected