Skip to main content

Reference / Modules / client / HashOrContent

Class: HashOrContent

client.HashOrContent

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new HashOrContent(parameters): HashOrContent

Parameters

NameType
parametersObject
parameters.content?File
parameters.description?FileDescription

Returns

HashOrContent

Defined in

packages/client/src/Hash.ts:31

Properties

_content

Private Optional _content: File

Defined in

packages/client/src/Hash.ts:50


_hash

Private Optional _hash: Hash

Defined in

packages/client/src/Hash.ts:48


_mimeType

Private _mimeType: MimeType

Defined in

packages/client/src/Hash.ts:56


_name

Private _name: string

Defined in

packages/client/src/Hash.ts:58


_size

Private Optional _size: bigint

Defined in

packages/client/src/Hash.ts:54


finalized

Private finalized: boolean

Defined in

packages/client/src/Hash.ts:52

Accessors

content

get content(): File

Returns

File

Defined in

packages/client/src/Hash.ts:96


contentHash

get contentHash(): Hash

Returns

Hash

Defined in

packages/client/src/Hash.ts:64


hasContent

get hasContent(): boolean

Returns

boolean

Defined in

packages/client/src/Hash.ts:60


mimeType

get mimeType(): MimeType

Returns

MimeType

Defined in

packages/client/src/Hash.ts:104


name

get name(): string

Returns

string

Defined in

packages/client/src/Hash.ts:108


size

get size(): bigint

Returns

bigint

Defined in

packages/client/src/Hash.ts:100

Methods

ensureFinalized

ensureFinalized(): void

Returns

void

Defined in

packages/client/src/Hash.ts:69


finalize

finalize(): Promise<void>

Returns

Promise<void>

Defined in

packages/client/src/Hash.ts:75


hashContent

hashContent(): Promise<HashAndSize>

Returns

Promise<HashAndSize>

Defined in

packages/client/src/Hash.ts:92


fromContent

fromContent(content): HashOrContent

Parameters

NameType
contentFile

Returns

HashOrContent

Defined in

packages/client/src/Hash.ts:21


fromContentFinalized

fromContentFinalized(fileContent): Promise<HashOrContent>

Parameters

NameType
fileContentFile

Returns

Promise<HashOrContent>

Defined in

packages/client/src/Hash.ts:25


fromDescription

fromDescription(description): HashOrContent

Parameters

NameType
descriptionFileDescription

Returns

HashOrContent

Defined in

packages/client/src/Hash.ts:17