dojox/data/FileStore (version 1.10)

Usage

var foo = new FileStore(args);
dojox/data/FileStore
<

A simple store that provides a datastore interface to a filesystem. It takes a few parameters for initialization:

The purpose of this store is to represent a file as a datastore item. The datastore item by default has the following attributes that can be examined on it.

Note that the store's server call pattern is RESTlike.

The store also supports the passing of configurable options to the back end service, such as expanding all child files (no lazy load), displaying hidden files, displaying only directories, and so on. These are defined through a comma-separated list in declarative, or through setting the options array in programmatic. example: options="expand,dirsOnly,showHiddenFiles"

>A simple store that provides a datastore interface to a filesystem. It takes a few parameters for initialization:

The purpose of this store is to represent a file as a datastore item. The datastore item by default has the following attributes that can be examined on it.

Note that the store's server call pattern is RESTlike.

The store also supports the passing of configurable options to the back end service, such as expanding all child files (no lazy load), displaying hidden files, displaying only directories, and so on. These are defined through a comma-separated list in declarative, or through setting the options array in programmatic. example: options="expand,dirsOnly,showHiddenFiles"

>
Parameter Type Description
args Object

See the dojox/data/FileStore reference documentation for more information.

Property Summary

  • _attributesInternal variable of attributes all file items should have.
  • _identifierDefault attribute to use to represent the item&#39;s identifier.
  • _storeRefInternal variable used to denote an item came from this store instance.
  • failOkFlag to pass on to xhr functions to check if we are OK to fail the call silently
  • labelDefault attribute to use to represent the item as a user-readable string.
  • optionsArray of options to always send when doing requests.
  • pathAsQueryParam
  • pathSeparatorThe path separator to use when chaining requests for children Can be overriden by the server on initial load
  • urlThe URL to the file path service.
  • urlPreventCacheFlag to dennote if preventCache should be passed to xhrGet.

Method Summary

  • _assertIsAttribute(attribute) This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.
  • _assertIsItem(item) This function tests whether the item passed in is indeed an item in the store.
  • _processItem(item) Internal function for processing an item returned from the store.
  • _processItemArray(itemArray) Internal function for processing an array of items for return.
  • _processResult(data,request)
  • close(request) See dojo/data/api/Read.close()
  • containsValue(item,attribute,value) See dojo/data/api/Read.containsValue()
  • fetch(request) Fetch items that match to a query
  • fetchItemByIdentity(keywordArgs) See dojo/data/api/Read.loadItem()
  • getAttributes(item) See dojo/data/api/Read.getAttributes()
  • getFeatures() See dojo/data/api/Read.getFeatures()
  • getIdentity(item) See dojo/data/api/Identity.getIdentity()
  • getIdentityAttributes(item) See dojo/data/api/Read.getLabelAttributes()
  • getLabel(item) See dojo/data/api/Read.getLabel()
  • getLabelAttributes(item) See dojo/data/api/Read.getLabelAttributes()
  • getValue(item,attribute,defaultValue) See dojo/data/api/Read.getValue()
  • getValues(item,attribute) See dojo/data/api/Read.getValue()
  • hasAttribute(item,attribute) See dojo/data/api/Read.hasAttribute()
  • isItem(item) See dojo/data/api/Read.isItem()
  • isItemLoaded(item) See dojo/data/api/Read.isItemLoaded()
  • loadItem(keywordArgs) See dojo/data/api/Read.loadItem()

Properties

_attributes
Defined by: dojox/data/FileStore

Internal variable of attributes all file items should have.

_identifier
Defined by: dojox/data/FileStore

Default attribute to use to represent the item's identifier. Path should always be unique in the store instance.

_storeRef
Defined by: dojox/data/FileStore

Internal variable used to denote an item came from this store instance.

failOk
Defined by: dojox/data/FileStore

Flag to pass on to xhr functions to check if we are OK to fail the call silently

label
Defined by: dojox/data/FileStore

Default attribute to use to represent the item as a user-readable string. Public, so users can change it.

options
Defined by: dojox/data/FileStore

Array of options to always send when doing requests. Back end service controls this, like 'dirsOnly', 'showHiddenFiles', 'expandChildren', etc.

pathAsQueryParam
Defined by: dojox/data/FileStore
pathSeparator
Defined by: dojox/data/FileStore

The path separator to use when chaining requests for children Can be overriden by the server on initial load

url
Defined by: dojox/data/FileStore

The URL to the file path service.

urlPreventCache
Defined by: dojox/data/FileStore

Flag to dennote if preventCache should be passed to xhrGet.

Methods

_assertIsAttribute(attribute)

This function tests whether the item passed in is indeed a valid 'attribute' like type for the store.

Parameter Type Description
attribute attribute-name-string

The attribute to test for being contained by the store.

_assertIsItem(item)

This function tests whether the item passed in is indeed an item in the store.

Parameter Type Description
item item

The item to test for being contained by the store.

_processItem(item)

Internal function for processing an item returned from the store. It sets up the store ref as well as sets up the attributes necessary to invoke a lazy load on a child, if there are any.

Parameter Type Description
item undefined
Returns:null | undefined
_processItemArray(itemArray)

Internal function for processing an array of items for return.

Parameter Type Description
itemArray undefined
Returns:undefined
_processResult(data,request)
Parameter Type Description
data undefined
request undefined
close(request)

See dojo/data/api/Read.close()

Parameter Type Description
request undefined
containsValue(item,attribute,value)

See dojo/data/api/Read.containsValue()

Parameter Type Description
item undefined
attribute undefined
value undefined
Returns:boolean
fetch(request)

Fetch items that match to a query

Parameter Type Description
request undefined

A request object

fetchItemByIdentity(keywordArgs)

See dojo/data/api/Read.loadItem()

Parameter Type Description
keywordArgs undefined
getAttributes(item)

See dojo/data/api/Read.getAttributes()

Parameter Type Description
item undefined
Returns:undefined
getFeatures()

See dojo/data/api/Read.getFeatures()

Returns:object
getIdentity(item)

See dojo/data/api/Identity.getIdentity()

Parameter Type Description
item item
Returns:undefined
getIdentityAttributes(item)

See dojo/data/api/Read.getLabelAttributes()

Parameter Type Description
item undefined
Returns:Array
getLabel(item)

See dojo/data/api/Read.getLabel()

Parameter Type Description
item undefined
Returns:undefined
getLabelAttributes(item)

See dojo/data/api/Read.getLabelAttributes()

Parameter Type Description
item undefined
Returns:Array
getValue(item,attribute,defaultValue)

See dojo/data/api/Read.getValue()

Parameter Type Description
item undefined
attribute undefined
defaultValue undefined
Returns:undefined
getValues(item,attribute)

See dojo/data/api/Read.getValue()

Parameter Type Description
item undefined
attribute undefined
Returns:Array
hasAttribute(item,attribute)

See dojo/data/api/Read.hasAttribute()

Parameter Type Description
item undefined
attribute undefined
Returns:boolean
isItem(item)

See dojo/data/api/Read.isItem()

Parameter Type Description
item undefined
Returns:boolean
isItemLoaded(item)

See dojo/data/api/Read.isItemLoaded()

Parameter Type Description
item undefined
Returns:boolean
loadItem(keywordArgs)

See dojo/data/api/Read.loadItem()

Parameter Type Description
keywordArgs undefined
Error in the documentation? Can’t find what you are looking for? Let us know!