A database instance to interact with.
optional unique id for this file
optional filename for this file, no unique constrain on the field
sets the mode for this file.
optional properties to specify.
Retrieve this file’s chunks collection.
Returns the current chunk size of the file.
Saves this file to the database.
Saves this file to the database. This will overwrite the old entry if it already exists. This will work properly only if mode was initialized to “w” or “w+”.
Retrieves the file collection associated with this object.
A database instance to interact with.
Verify if the file is at EOF.
optional filename for this file, no unique constrain on the field
Retrieves a single character from this file.
optional unique id for this file
The md5 checksum for this file.
sets the mode for this file.
Opens the file from the database and initialize this object.
Opens the file from the database and initialize this object. Also creates a new one if file does not exist.
optional properties to specify.
Writes a string to the file with a newline character appended at the end if the given string does not have one.
Writes a string to the file with a newline character appended at the end if the given string does not have one.
puts(string, callback)
Retrieves the contents of this file and advances the read/write head.
Retrieves the contents of this file and advances the read/write head. Works with Buffers only.
read([length][, buffer], callback)
Retrieves the contents of this file and advances the read/write head.
Retrieves the contents of this file and advances the read/write head. Works with Buffers only.
read([length][, buffer], callback)
Retrieves the contents of this file and advances the read/write head.
Retrieves the contents of this file and advances the read/write head. Works with Buffers only.
read([length][, buffer], callback)
Reads the data of this file.
Reads the data of this file.
readlines([separator], callback)
Reads the data of this file.
Reads the data of this file.
readlines([separator], callback)
Deletes all the chunks of this file in the database if mode was set to “w” or “w+” and resets the read/write head to the initial position.
Moves the read/write head to a new location.
Moves the read/write head to a new location. Seek Location Modes:
seek([position][, seekLocation], callback)
Moves the read/write head to a new location.
Moves the read/write head to a new location. Seek Location Modes:
seek([position][, seekLocation], callback)
Moves the read/write head to a new location.
Moves the read/write head to a new location. Seek Location Modes:
seek([position][, seekLocation], callback)
Returns read stream based on this GridStore file.
Returns read stream based on this GridStore file.
if true current GridStore will be closed when EOF and ‘close’ event will be fired
Returns read stream based on this GridStore file.
Retrieves the position of the read/write head of this file.
Retrieves the position of the read/write head of this file.
tell(length, buffer, callback)
Retrieves the position of the read/write head of this file.
Retrieves the position of the read/write head of this file.
the number of characters to read. Reads all the characters from the read/write head to the EOF if not specified (optional).
a String or Buffer to hold temporary data. This is used for storing the string data read so far when recursively calling this method (optional).
tell(length, buffer, callback)
Retrieves the position of the read/write head of this file.
Retrieves the position of the read/write head of this file.
the number of characters to read. Reads all the characters from the read/write head to the EOF if not specified (optional).
a String or Buffer to hold temporary data. This is used for storing the string data read so far when recursively calling this method (optional).
the command callback.
tell(length, buffer, callback)
Retrieves the position of the read/write head of this file.
Retrieves the position of the read/write head of this file.
the number of characters to read. Reads all the characters from the read/write head to the EOF if not specified (optional).
a String or Buffer to hold temporary data. This is used for storing the string data read so far when recursively calling this method (optional).
tell(length, buffer, callback)
Retrieves the position of the read/write head of this file.
Retrieves the position of the read/write head of this file.
the number of characters to read. Reads all the characters from the read/write head to the EOF if not specified (optional).
a String or Buffer to hold temporary data. This is used for storing the string data read so far when recursively calling this method (optional).
the command callback.
tell(length, buffer, callback)
Deletes all the chunks of this file in the database.
Writes some data.
Writes some data. This method will work properly only if initialized with mode “w” or “w+”.
write(data[, close], callback)
Writes some data.
Writes some data. This method will work properly only if initialized with mode “w” or “w+”.
write(data[, close], callback)
Writes some data.
Writes some data. This method will work properly only if initialized with mode “w” or “w+”.
write(data[, close], callback)
Writes some data.
Writes some data. This method will work properly only if initialized with mode “w” or “w+”.
write(data[, close], callback)
Stores a file from the file system to the GridFS database.
Grid Store