Packagecom.adobe.flascc.vfs
Classpublic class InMemoryBackingStore
InheritanceInMemoryBackingStore Inheritance flash.events.EventDispatcher
Implements IBackingStore
Subclasses HTTPBackingStore, LSOBackingStore, URLLoaderVFS

The InMemoryBackingStore implements 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.



Public Properties
 PropertyDefined By
  readOnly : Boolean
[read-only] This BackingStore is read-write, so this always returns false.
InMemoryBackingStore
Public Methods
 MethodDefined 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
Property Detail
readOnlyproperty
readOnly:Boolean  [read-only]

This BackingStore is read-write, so this always returns false.


Implementation
    public function get readOnly():Boolean
Constructor Detail
InMemoryBackingStore()Constructor
public function InMemoryBackingStore()

Construct a new InMemoryBackingStore

Method Detail
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

Returns
ByteArray
getPaths()method 
public function getPaths():Vector.<String>

Retrieves all of the files paths contained in this BackingStore.

Returns
Vector.<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

Returns
Boolean
pathExists()method 
public function pathExists(path:String):Boolean

Checks if a path exists.

Parameters

path:String

Returns
Boolean