Package | com.adobe.flascc.vfs |
Class | public class InMemoryBackingStore |
Inheritance | InMemoryBackingStore ![]() |
Implements | IBackingStore |
Subclasses | HTTPBackingStore, LSOBackingStore, URLLoaderVFS |
IBackingStore
with a memory resident
mapping between paths and file data stored as a ByteArray.
This class does not depend on the rest of flascc, so it can be safely used in isolation, such as in a preloader.
Property | Defined By | ||
---|---|---|---|
readOnly : Boolean [read-only]
This BackingStore is read-write, so this always returns false. | InMemoryBackingStore |
Method | Defined By | ||
---|---|---|---|
Construct a new InMemoryBackingStore
| InMemoryBackingStore | ||
addDirectory(path:String):void
Insert a mapping representing a directory. | InMemoryBackingStore | ||
addFile(path:String, data:ByteArray):void
Insert a mapping from path to data into the filemap. | InMemoryBackingStore | ||
deleteFile(path:String):void
Given an array of strings representing file paths, this method removes
the reference to that file from the filemap. | InMemoryBackingStore | ||
flush():void
Commits any outstanding changes to the underlying datastore. | InMemoryBackingStore | ||
getFile(path:String):ByteArray
Given a file object returned from makeFileObject this method extracts the contents of that file as a ByteArray
| InMemoryBackingStore | ||
getPaths():Vector.<String>
Retrieves all of the files paths contained in this BackingStore. | InMemoryBackingStore | ||
isDirectory(path:String):Boolean
Checks if a path is a directory. | InMemoryBackingStore | ||
pathExists(path:String):Boolean
Checks if a path exists. | InMemoryBackingStore |
readOnly | property |
readOnly:Boolean
[read-only] This BackingStore is read-write, so this always returns false.
public function get readOnly():Boolean
InMemoryBackingStore | () | Constructor |
public function InMemoryBackingStore()
Construct a new InMemoryBackingStore
addDirectory | () | method |
public function addDirectory(path:String):void
Insert a mapping representing a directory.
Parameters
path:String |
addFile | () | method |
public function addFile(path:String, data:ByteArray):void
Insert a mapping from path to data into the filemap.
Parameters
path:String | |
data:ByteArray |
deleteFile | () | method |
public function deleteFile(path:String):void
Given an array of strings representing file paths, this method removes the reference to that file from the filemap.
Parameters
path:String |
flush | () | method |
public function flush():void
Commits any outstanding changes to the underlying datastore. This is a no-op in this class, but could do something useful in a BackingStore that would benefit from buffering some of its actual write operations.
getFile | () | method |
public function getFile(path:String):ByteArray
Given a file object returned from makeFileObject this method extracts the contents of that file as a ByteArray
Parameters
path:String |
ByteArray |
getPaths | () | method |
public function getPaths():Vector.<String>
Retrieves all of the files paths contained in this BackingStore.
ReturnsVector.<String> — A Vector of all file paths contained in this BackingStore.
|
isDirectory | () | method |
public function isDirectory(path:String):Boolean
Checks if a path is a directory.
Parameters
path:String |
Boolean |
pathExists | () | method |
public function pathExists(path:String):Boolean
Checks if a path exists.
Parameters
path:String |
Boolean |