Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename methods to match the IMAP command names

  • Loading branch information...
commit 83e81b67ae47898528d3eb2419003f701da0ff9a 1 parent 4e5b7a8
@aredridel authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 imap.js
View
10 imap.js
@@ -540,7 +540,7 @@ ImapConnection.prototype.closeBox = function(cb) {
});
};
-ImapConnection.prototype.removeDeleted = function(cb) {
+ImapConnection.prototype.expunge = function(cb) {
if (this._state.status !== STATES.BOXSELECTED)
throw new Error('No mailbox is currently selected');
cb = arguments[arguments.length-1];
@@ -548,14 +548,14 @@ ImapConnection.prototype.removeDeleted = function(cb) {
this._send('EXPUNGE', cb);
};
-ImapConnection.prototype.getBoxes = function(namespace, cb) {
+ImapConnection.prototype.list = function(namespace, cb) {
cb = arguments[arguments.length-1];
if (arguments.length !== 2)
namespace = '';
this._send('LIST "' + escape(namespace) + '" "*"', cb);
};
-ImapConnection.prototype.addBox = function(name, cb) {
+ImapConnection.prototype.create = function(name, cb) {
cb = arguments[arguments.length-1];
if (typeof name !== 'string' || name.length === 0)
throw new Error('Mailbox name must be a string describing the full path'
@@ -563,7 +563,7 @@ ImapConnection.prototype.addBox = function(name, cb) {
this._send('CREATE "' + escape(name) + '"', cb);
};
-ImapConnection.prototype.delBox = function(name, cb) {
+ImapConnection.prototype.delete = function(name, cb) {
cb = arguments[arguments.length-1];
if (typeof name !== 'string' || name.length === 0)
throw new Error('Mailbox name must be a string describing the full path'
@@ -571,7 +571,7 @@ ImapConnection.prototype.delBox = function(name, cb) {
this._send('DELETE "' + escape(name) + '"', cb);
};
-ImapConnection.prototype.renameBox = function(oldname, newname, cb) {
+ImapConnection.prototype.rename = function(oldname, newname, cb) {
cb = arguments[arguments.length-1];
if (typeof oldname !== 'string' || oldname.length === 0)
throw new Error('Old mailbox name must be a string describing the full path'
Please sign in to comment.
Something went wrong with that request. Please try again.