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

Method execute

src/plugins/ftp/src/android/com/foxdebug/ftp/Ftp.java:51–75  ·  view source on GitHub ↗
(
    String action,
    JSONArray args,
    CallbackContext callback
  )

Source from the content-addressed store, hash-verified

49 }
50
51 public boolean execute(
52 String action,
53 JSONArray args,
54 CallbackContext callback
55 ) {
56 try {
57 Method method =
58 this.getClass()
59 .getDeclaredMethod(action, JSONArray.class, CallbackContext.class);
60 if (method != null) {
61 method.invoke(this, args, callback);
62 return true;
63 }
64 return false;
65 } catch (NoSuchMethodException e) {
66 callback.error(e.getMessage());
67 return false;
68 } catch (SecurityException e) {
69 callback.error(e.getMessage());
70 return false;
71 } catch (Exception e) {
72 callback.error(e.getMessage());
73 return false;
74 }
75 }
76
77 public void connect(JSONArray args, CallbackContext callback) {
78 connect(args, callback, false);

Callers 15

connectMethod · 0.45
listDirectoryMethod · 0.45
existsMethod · 0.45
sendNoOpMethod · 0.45
deleteFileMethod · 0.45
deleteDirectoryMethod · 0.45
renameMethod · 0.45
downloadFileMethod · 0.45
uploadFileMethod · 0.45
getKeepAliveMethod · 0.45
execCommandMethod · 0.45
isConnectedMethod · 0.45

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected