Refactored the Image module. Added image.fromUrl method. Added image-tests.

This commit is contained in:
atanasovg
2014-05-14 19:06:45 +03:00
parent 4880d048c4
commit 0242773cae
15 changed files with 309 additions and 202 deletions

View File

@@ -17,9 +17,11 @@ export declare class FileSystemEntity {
public path: string;
/**
* Gets the Folder object representing the parent of this entity. Will be null for a root folder like Documents or Temporary.
*/
public getParent(): Folder;
* Gets the Folder object representing the parent of this entity.
* Will be null for a root folder like Documents or Temporary.
* This property is readonly.
*/
public parent: Folder;
/**
* Removes (deletes) the current Entity from the file system.

View File

@@ -49,8 +49,10 @@ var createFolder = function (info: { path: string; name: string; }) {
};
export class FileSystemEntity {
public getParent(): Folder {
/**
* Gets the Folder object representing the parent of this entity. Will be null for a root folder like Documents or Temporary.
*/
get parent(): Folder {
var onError = function (error) {
throw error;
}
@@ -93,7 +95,7 @@ export class FileSystemEntity {
}
}
var parentFolder = this.getParent();
var parentFolder = this.parent;
if (!parentFolder) {
deferred.reject(new Error("No parent folder."));
return deferred.promise();