File: "storageAdapter.server.js" Where: {server}
- #############################################################################
STORAGE ADAPTER
#############################################################################
Attempts to insert a file into the store, first running the beforeSave
function for the store if there is one. If there is a temporary failure,
returns (or passes to the second argument of the callback) `null`. If there
is a permanant failure or the beforeSave function returns `false`, returns
`false`. If the file is successfully stored, returns an object with file
info that the FS.Collection can save.
Also updates the `files` collection for this store to save info about this
file.
-
This method insert is defined in self
Arguments
-
- #### <a name="self.update"></a>*self*.update(fsFile, [options], [callback]) <sub><i>Server</i></sub> ####
Attempts to update a file in the store, first running the beforeSave function for the store if there is one. If there is a temporary failure, returns (or passes to the second argument of the callback)
null
. If there is a permanant failure or the beforeSave function returnsfalse
, returnsfalse
. If the file is successfully stored, returns an object with file info that the FS.Collection can save. Also updates thefiles
collection for this store to save info about this file.- *This method __update__ is defined in `self`* __Arguments__ * __fsFile__ *{[FS.File](#FS.File)}* The FS.File instance to be stored. * __options__ *{Object}* (Optional) Options (currently unused) * __callback__ *{Function}* (Optional) If not provided, will block and return file info. - > ```self.update = function(fsFile, options, callback) { ...``` [storageAdapter.server.js:264](storageAdapter.server.js#L264) - #### <a name="self.remove"></a>*self*.remove(fsFile, [options], [callback]) <sub><i>Server</i></sub> ####
Attempts to remove a file from the store. Returns true if removed, or false. Also removes file info from the
files
collection for this store.```
This method remove is defined in
self
Arguments
-
self.remove = function(fsFile, options, callback) { ...
storageAdapter.server.js:321
-