mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Refactored the Image module. Added image.fromUrl method. Added image-tests.
This commit is contained in:
8
filesystem/file_system.d.ts
vendored
8
filesystem/file_system.d.ts
vendored
@@ -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.
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user