CrEntry abstract class
abstract class CrEntry extends ChromeObject implements Entry { // This factory returns either a FileEntry or a DirectoryEntry. factory CrEntry.fromProxy(JsObject jsProxy) { if (jsProxy == null) { return null; } else if (jsProxy['isFile']) { return new ChromeFileEntry.fromProxy(jsProxy); } else { return new CrDirectoryEntry.fromProxy(jsProxy); } } CrEntry._fromProxy(JsObject jsProxy): super.fromProxy(jsProxy); bool get isDirectory => jsProxy['isDirectory']; bool get isFile => jsProxy['isFile']; String get fullPath => jsProxy['fullPath']; String get name => jsProxy['name']; FileSystem get filesystem => new CrFileSystem.fromProxy(jsProxy['filesystem']); String toUrl() => this.jsProxy.callMethod('toURL'); Future<Entry> copyTo(DirectoryEntry parent, {String name}) { var completer = new _ChromeCompleterWithError<Entry>.oneArg((obj) => new CrEntry.fromProxy(obj)); jsProxy.callMethod('copyTo', [(parent as ChromeObject).jsProxy, name, completer.callback, completer.errorCallback]); return completer.future; } Future<Entry> moveTo(DirectoryEntry parent, {String name}) { var completer = new _ChromeCompleterWithError<Entry>.oneArg((obj) => new CrEntry.fromProxy(obj)); jsProxy.callMethod('moveTo', [(parent as ChromeObject).jsProxy, name, completer.callback, completer.errorCallback]); return completer.future; } Future remove() { var completer = new _ChromeCompleterWithError<Metadata>.noArgs(); jsProxy.callMethod('remove', [completer.callback, completer.errorCallback]); return completer.future; } Future<Metadata> getMetadata() { var completer = new _ChromeCompleterWithError<Metadata>.oneArg((obj) => new CrMetadata.fromProxy(obj)); jsProxy.callMethod('getMetadata', [completer.callback, completer.errorCallback]); return completer.future; } Future<Entry> getParent() { var completer = new _ChromeCompleterWithError<Entry>.oneArg((obj) => new CrDirectoryEntry.fromProxy(obj)); jsProxy.callMethod('getParent', [completer.callback, completer.errorCallback]); return completer.future; } String toString() => name; }
Extends
ChromeObject > CrEntry
Subclasses
Implements
Entry
Constructors
factory CrEntry.fromProxy(JsObject jsProxy) #
Create a new instance of a ChromeObject
, which delegates to the given
JsObject proxy.
docs inherited from ChromeObject
factory CrEntry.fromProxy(JsObject jsProxy) { if (jsProxy == null) { return null; } else if (jsProxy['isFile']) { return new ChromeFileEntry.fromProxy(jsProxy); } else { return new CrDirectoryEntry.fromProxy(jsProxy); } }
Properties
Methods
Future<Entry> copyTo(DirectoryEntry parent, {String name}) #
Future<Entry> copyTo(DirectoryEntry parent, {String name}) { var completer = new _ChromeCompleterWithError<Entry>.oneArg((obj) => new CrEntry.fromProxy(obj)); jsProxy.callMethod('copyTo', [(parent as ChromeObject).jsProxy, name, completer.callback, completer.errorCallback]); return completer.future; }
Future<Metadata> getMetadata() #
Future<Metadata> getMetadata() { var completer = new _ChromeCompleterWithError<Metadata>.oneArg((obj) => new CrMetadata.fromProxy(obj)); jsProxy.callMethod('getMetadata', [completer.callback, completer.errorCallback]); return completer.future; }
Future<Entry> getParent() #
Future<Entry> getParent() { var completer = new _ChromeCompleterWithError<Entry>.oneArg((obj) => new CrDirectoryEntry.fromProxy(obj)); jsProxy.callMethod('getParent', [completer.callback, completer.errorCallback]); return completer.future; }
Future<Entry> moveTo(DirectoryEntry parent, {String name}) #
Future<Entry> moveTo(DirectoryEntry parent, {String name}) { var completer = new _ChromeCompleterWithError<Entry>.oneArg((obj) => new CrEntry.fromProxy(obj)); jsProxy.callMethod('moveTo', [(parent as ChromeObject).jsProxy, name, completer.callback, completer.errorCallback]); return completer.future; }
Future remove() #
Future remove() { var completer = new _ChromeCompleterWithError<Metadata>.noArgs(); jsProxy.callMethod('remove', [completer.callback, completer.errorCallback]); return completer.future; }
String toString() #
Returns a string representation of this object.
docs inherited from Object
String toString() => name;
String toUrl() #
String toUrl() => this.jsProxy.callMethod('toURL');