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

Method pwd

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

Source from the content-addressed store, hash-verified

682 }
683
684 public void pwd(JSONArray args, CallbackContext callback) {
685 cordova
686 .getThreadPool()
687 .execute(
688 new Runnable() {
689 public void run() {
690 try {
691 if (ssh != null && sftp != null) {
692 String pwd = sftp.pwd();
693 callback.success(pwd);
694 return;
695 }
696 callback.error("Not connected");
697 } catch (SftpStatusException | SshException e) {
698 callback.error(errMessage(e));
699 }
700 }
701 }
702 );
703 }
704
705 private String sanitizePath(String path) {
706 try {

Callers 1

runMethod · 0.45

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected