content-entry v12.0.0
content-entrycontent entries for content containers (aka files)
API
Table of Contents* CollectionEntryMixin
* [Parameters](#parameters)
- BaseEntry
- BufferContentEntryMixin
- BufferContentEntry
- ContentEntry
- DeletedContentEntry
- EmptyContentEntry
- toReadableStream
- ReadableStreamContentEntry
- StreamContentEntryMixin
- StringContentEntryMixin
- StringContentEntry
- equalsUint8Arrays
Parameters## CollectionEntryMixinBrings directory attributes to entries.### Parameters
superclass
## BaseEntryRepresentation of one file or directory entry. All names are absolute (no leading '/') the group seperator is '/'.### Parametersname
string name inside of the container### Propertiesname
string name inside of the container### typesReturns Array[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) UTI types### isCollectionReturns boolean false### isBlobReturns boolean false### modeDefault unix mode for files.Returns number 0644### isEmptyReturns boolean true if there is no content (length := 0).### isDeletedReturns boolean true if we represent a deleted entry### isExistentReturns boolean true if we exist### equals#### Parametersother
Returns Promise[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) true if name, isBlob and isCollection are the same## BufferContentEntryMixinContent entries where a Uint8Array is the primary data representation.### Parameterssuperclass
### Propertiesbuffer
Uint8Array ## BufferContentEntryExtends BufferContentEntryMixin(ContentEntry)ConentEntry with a Uint8Array as content store.### Parametersname
string buffer
Uint8Array ### isEmptyReturns boolean true if buffer length is zero### sizeReturns number size in bytes## ContentEntryExtends BaseEntryGeneral content access entries.### isBlobReturns boolean true### typesUTI types for this entry. defaults to "public.content".Returns Array[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) ### readStreamReturns any undefined### stringReturns string ### bufferreturn {Uint8Array}### encodingThe default encoding used to convert content to strings.Returns BufferEncoding ### equalsContentCompare content against other entry.#### Parameters*other
ContentEntry Returns Promise[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) true if other has the same content (bitwise)### getReadStreamMeta* deprecated: This is deprecated.## DeletedContentEntryExtends EmptyContentEntryRepresents a deleted entry.### isDeletedWe are always deleted.Returns boolean true### isExistentNothing there any more.Returns boolean false## EmptyContentEntryExtends ContentEntryRepresents a entry without content (content length = 0).### stringReturns string ### bufferReturns Uint8Array zero length buffer### readStreamReturns ReadableStream zero length stream.## toReadableStream### Parametersinput
string Returns Readable ## ReadableStreamContentEntryExtends StreamContentEntryMixin(ContentEntry)Content entries where a readable stream is the primary data representation.### Parametersname
stringreadStream
ReadableStream ### Properties*name
stringreadStream
ReadableStream ## StreamContentEntryMixinContent entries where a stream is the primary data representation.### Parameterssuperclass
## StringContentEntryMixinContent entries where a string is the primary data representation.### Parameterssuperclass
### Propertiesstring
string ## StringContentEntryExtends StringContentEntryMixin(ContentEntry)Content entries where a string is the primary data representation.### Parametersname
stringvalue
string ### Properties*name
stringstring
string ### isEmptyReturns boolean true if string length is zero## equalsUint8ArraysReturns true if the two passed Uint8Arrays have the same content### Parameters*a
Uint8Arrayb
Uint8Array Returns boolean true if content of a equals b
install
With npm do:
```bash
npm install content-entry
```
license
BSD-2-Clause
4 months ago
7 months ago
8 months ago
9 months ago
9 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago