Skip to content

Commit

Permalink
Removed the unused 'isOnTheSameFSWith' and 'isSame' methods of the 'I…
Browse files Browse the repository at this point in the history
…Resource' interface
  • Loading branch information
AdrienCastex committed Jun 15, 2017
1 parent 07cad68 commit 8660bbf
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 24 deletions.
2 changes: 0 additions & 2 deletions lib/resource/IResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ export interface IResource {
delete(callback: SimpleCallback): any;
moveTo(parent: IResource, newName: string, overwrite: boolean, callback: SimpleCallback): any;
rename(newName: string, callback: Return2Callback<string, string>): any;
isSame(resource: IResource, callback: ReturnCallback<boolean>): any;
isOnTheSameFSWith(resource: IResource, callback: ReturnCallback<boolean>): any;
write(targetSource: boolean, callback: ReturnCallback<Writable>): any;
read(targetSource: boolean, callback: ReturnCallback<Readable>): any;
mimeType(targetSource: boolean, callback: ReturnCallback<string>): any;
Expand Down
2 changes: 0 additions & 2 deletions lib/resource/std/StandardResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export declare abstract class StandardResource implements IResource {
dateCreation: number;
dateLastModified: number;
constructor(parent: IResource, fsManager: FSManager);
isSame(resource: IResource, callback: ReturnCallback<boolean>): void;
isOnTheSameFSWith(resource: IResource, callback: ReturnCallback<boolean>): void;
getAvailableLocks(callback: ReturnCallback<LockKind[]>): void;
getLocks(callback: ReturnCallback<Lock[]>): void;
setLock(lock: Lock, callback: SimpleCallback): void;
Expand Down
6 changes: 0 additions & 6 deletions lib/resource/std/StandardResource.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ var StandardResource = (function () {
.done(function (sizes) { return callback(null, sizes.reduce(function (o, s) { return o + s; }, 0)); });
});
};
StandardResource.prototype.isSame = function (resource, callback) {
callback(null, resource === this);
};
StandardResource.prototype.isOnTheSameFSWith = function (resource, callback) {
callback(null, resource.fsManager === this.fsManager);
};
StandardResource.prototype.getAvailableLocks = function (callback) {
callback(null, [
new LockKind_1.LockKind(LockScope_1.LockScope.Exclusive, LockType_1.LockType.Write),
Expand Down
4 changes: 0 additions & 4 deletions src/resource/IResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ export interface IResource
delete(callback : SimpleCallback)
moveTo(parent : IResource, newName : string, overwrite : boolean, callback : SimpleCallback)
rename(newName : string, callback : Return2Callback<string, string>)

// ****************************** Tests ****************************** //
isSame(resource : IResource, callback : ReturnCallback<boolean>)
isOnTheSameFSWith(resource : IResource, callback : ReturnCallback<boolean>)

// ****************************** Content ****************************** //
write(targetSource : boolean, callback : ReturnCallback<Writable>)
Expand Down
10 changes: 0 additions & 10 deletions src/resource/std/StandardResource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ export abstract class StandardResource implements IResource
this.dateLastModified = this.dateCreation;
}

// ****************************** Tests ****************************** //
isSame(resource : IResource, callback : ReturnCallback<boolean>)
{
callback(null, resource === (this as object));
}
isOnTheSameFSWith(resource : IResource, callback : ReturnCallback<boolean>)
{
callback(null, resource.fsManager === this.fsManager);
}

// ****************************** Locks ****************************** //
getAvailableLocks(callback : ReturnCallback<LockKind[]>)
{
Expand Down

0 comments on commit 8660bbf

Please sign in to comment.