like 'throw', but a function rather than a statement.
The exception or string to be thrown.
The data to be parsed
The field delimiter, either "\t"
or ","
.
Encode a string
into an ArrayBuffer
.
The string
to be encoded
An ArrayBuffer
with the string data as UTF-16
Convenience method to construct an entry in a AFileSystem tree, without having to specifiy the name multiple times. Takes a name and a data item, optional metadata, and list of versions, and constructs the appropriate Files array for the tree.
Simplest usage:
F = new AFileSystem({
myFile: file('myFile', (myData));
});
Advanced usage that supplies a creation date as metadata, and gives the file
a version of 1 and a label of 'tested';
```javascript
F = new AFileSystem({
...entry('myFile', (myData), {creationDate}, 1, 'tested');
});
@param name The name of the file
@param data The data to store
@param metadata The metadata to associate with both array and file
@param versionList A list of versions to store the file under, or [1]
.
@returns
Convenience method to construct an entry in a AFileSystem tree. Takes a name and a data item, optional metadata, and list of versions, and constructs the appropriate Files array for the tree.
Simplest usage:
F = new AFileSystem({
myFile: file('myFile', (myData));
});
Advanced usage that supplies a creation date as metadata, and gives the file
a version of 1 and a label of 'tested';
```javascript
F = new AFileSystem({
myFile: file('myFile', (myData), {creationDate}, 1, 'tested');
});
@param name The name of the file
@param data The data to store
@param metadata The metadata to associate with both array and file
@param versionList A list of versions to store the file under, or [1]
.
@returns
Convert an ArrayBuffer
to a string
.
An ArrayBuffer
the string
A type guard that determines if the argument is a FileAttachment
A FileAttachment or AFile
true
if argument is a FileAttachment
Associate a metadata object with the specified file (or array of file versions). This is normally used to annotate entries in the AFileSystem tree.
The Files array
The version to set. Either a version number or a label
The FileAttachment or AFile
void
Convert a string
to an ArrayBuffer
, in either UTF8 or UTF16 formats.
an ArrayBuffer
with the string
's content in the requested format.
Generated using TypeDoc
General utilities