docs: function(/* dirPath[, mode], callback */) {
              var args = Array.prototype.slice.call(arguments),
                  argc = args.length;
              if (argc <= 1) {
                  throw new Error("Invalid number of arguments");
              }
              var dirPath = args[0],
                  mode = (typeof args[1] === "string") ? args[1] : "node",
                  callback = function() {};
              if (typeof args[1] === "function") {
                  callback = args[1];
              } else if (argc >= 3 && typeof args[2] === "function") {
                  callback = args[2];
              }
              client
                  .getDirectoryContents(dirPath)
                  .then(function(contents) {
                      var results;
                      if (mode === "node") {
                          results = contents.map(function(statItem) {
                              return statItem.basename;
                          });
                      } else if (mode === "stat") {
                          results = contents.map(__convertStat);
                      } else {
                          throw new Error("Unknown mode: " + mode);
                      }
                      __executeCallbackAsync(callback, [null, results]);
                  })
                  .catch(callback);
          }