Packagecom.adobe.flascc.vfs
Interfacepublic interface IBackingStore
Implementors InMemoryBackingStore

This interface describes how an underlying data store interacts with the flascc virtual filesystem. Implement this interface to customize the backing store for the VFS. Backing stores are added to the VFS via the IBackingStore.addBackingStore method.



Public Properties
 PropertyDefined By
  readOnly : Boolean
[read-only] Determines whether the filesystem may be changed.
IBackingStore
Public Methods
 MethodDefined By
  
addFile(path:String, data:ByteArray):void
Adds a file into the filesystem with a given path and contents.
IBackingStore
  
deleteFile(path:String):void
Deletes a file from the filesystem.
IBackingStore
  
flush():void
Writes any changes to the underlying store.
IBackingStore
  
getFile(path:String):ByteArray
Retrieves the contents of a file from this BackingStore.
IBackingStore
  
getPaths():Vector.<String>
Retrieves all of the files paths contained in this BackingStore.
IBackingStore
  
isDirectory(path:String):Boolean
Determines whether a path refers to a directory.
IBackingStore
  
pathExists(path:String):Boolean
Determines whether a path refers to a file or directory.
IBackingStore
Property Detail
readOnlyproperty
readOnly:Boolean  [read-only]

Determines whether the filesystem may be changed.


Implementation
    public function get readOnly():Boolean
Method Detail
addFile()method
public function addFile(path:String, data:ByteArray):void

Adds a file into the filesystem with a given path and contents. Ownership of the ByteArray is assumed to transfer to the BackingStore with this method.

Parameters

path:String — The path to the file.
 
data:ByteArray — The contents of the file.

deleteFile()method 
public function deleteFile(path:String):void

Deletes a file from the filesystem.

Parameters

path:String — The path to the file.

flush()method 
public function flush():void

Writes any changes to the underlying store.

getFile()method 
public function getFile(path:String):ByteArray

Retrieves the contents of a file from this BackingStore.

Parameters

path:String — The path to the file.

Returns
ByteArray — The contents of the file.
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

Determines whether a path refers to a directory.

Parameters

path:String — The path to be checked.

Returns
Boolean — true if the path refers to a directory, false otherwise.
pathExists()method 
public function pathExists(path:String):Boolean

Determines whether a path refers to a file or directory.

Parameters

path:String — The path to be checked.

Returns
Boolean — true if the path refers to a file or a directory, false otherwise.