From 1a38d52590514f1fa6ac7883e4fbe26542e8764b Mon Sep 17 00:00:00 2001 From: Adrien Castex Date: Tue, 20 Jun 2017 14:34:11 +0200 Subject: [PATCH] Removed the 'moveTo' method in the 'VirtualResource' class to use the default implementation in 'StandardResource' --- lib/resource/virtual/VirtualResource.d.ts | 1 - lib/resource/virtual/VirtualResource.js | 5 ++--- src/resource/virtual/VirtualResource.ts | 4 ---- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/resource/virtual/VirtualResource.d.ts b/lib/resource/virtual/VirtualResource.d.ts index 2e8a1977..27f8d4ec 100644 --- a/lib/resource/virtual/VirtualResource.d.ts +++ b/lib/resource/virtual/VirtualResource.d.ts @@ -8,7 +8,6 @@ export declare abstract class VirtualResource extends StandardResource { constructor(name: string, parent?: IResource, fsManager?: FSManager); create(callback: SimpleCallback): void; delete(callback: SimpleCallback): void; - moveTo(parent: IResource, newName: string, overwrite: boolean, callback: SimpleCallback): void; rename(newName: string, callback: Return2Callback): void; webName(callback: ReturnCallback): void; abstract type(callback: ReturnCallback): any; diff --git a/lib/resource/virtual/VirtualResource.js b/lib/resource/virtual/VirtualResource.js index 7b576561..938b756c 100644 --- a/lib/resource/virtual/VirtualResource.js +++ b/lib/resource/virtual/VirtualResource.js @@ -25,20 +25,19 @@ var VirtualResource = (function (_super) { _this.name = name; return _this; } + // ****************************** Actions ****************************** // VirtualResource.prototype.create = function (callback) { callback(null); }; VirtualResource.prototype.delete = function (callback) { this.removeFromParent(callback); }; - VirtualResource.prototype.moveTo = function (parent, newName, overwrite, callback) { - StandardResource_1.StandardResource.standardMoveTo(this, parent, newName, overwrite, callback); - }; VirtualResource.prototype.rename = function (newName, callback) { var oldName = this.name; this.name = newName; callback(null, oldName, newName); }; + // ****************************** Std meta-data ****************************** // VirtualResource.prototype.webName = function (callback) { callback(null, this.name); }; diff --git a/src/resource/virtual/VirtualResource.ts b/src/resource/virtual/VirtualResource.ts index 48e5bc89..b5dcf7f5 100644 --- a/src/resource/virtual/VirtualResource.ts +++ b/src/resource/virtual/VirtualResource.ts @@ -30,10 +30,6 @@ export abstract class VirtualResource extends StandardResource { this.removeFromParent(callback); } - moveTo(parent : IResource, newName : string, overwrite : boolean, callback : SimpleCallback) - { - StandardResource.standardMoveTo(this, parent, newName, overwrite, callback); - } rename(newName : string, callback : Return2Callback) { const oldName = this.name;