org.as2lib.core.BasicClass +--org.as2lib.io.file.SimpleFile
File
Default implementation of a file used within ActionScript. Supports all common features without any advantages.
new SimpleFile()
public function load(url:String):Void
Implementation of File.load.
url | URL to be loaded. |
public function isLoading(Void):Boolean
Implementation of File.isLoading.
true if the File is still loading.
public function isLoaded(Void):Boolean
Implementation of File.isLoaded.
true if the File is already loaded.
public function exists(Void):Boolean
Implementation of File.exists. This is a low level implementation of .exists. It won't work properly if you didn't load a file before.
true if the file exists.
FileNotLoadedException | if no file was loaded before. (Is related to the onLoad event.) |
public function getBytesLoaded(Void):Number
Implementation of File.getBytesLoaded.
Total amount of bytes loaded.
public function getBytesTotal(Void):Number
Implementation of File.getBytesTotal.
Total file size in bytes.
public function getLocation(Void):String
Implementation of File.getLocation.
Recent loaded location.
public function getContent(Void):String
Implementation of File.getContent.
Content of the File (if the file is loaded, else "null")
public function getLine(line:Number):String
Implementation of File.getLine.
Content of the requested line, "undefined" if the line doesn't exist.
public function countLines(Void):Number
Implementation of File.countLines.
Total amount of lines in the content.
public function addListener(listener:FileListener):Void
Implementation of File.addListener.
listener | Listener to be added to the file. |
public function toString():String
Extended Stringifier Example: [type org.as2lib.io.file.SimpleFile | Location: MyFile.txt; Size: 12KB; ]
The file as string.
toString() in org.as2lib.core.BasicInterface