Skip to content

Index

Defined in: src/internal/file_index.ts:30

Internal

An index of file metadata

new Index(entries?): Index

Defined in: ../../node_modules/typescript/lib/lib.es2015.collection.d.ts:51

readonly readonly [string, Inode][] | null

Index

Map<string, Inode>.constructor

new Index(iterable?): Index

Defined in: ../../node_modules/typescript/lib/lib.es2015.collection.d.ts:50

Iterable<readonly [string, Inode], any, any> | null

Index

Map<string, Inode>.constructor

readonly [toStringTag]: string

Defined in: ../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:135

Map.[toStringTag]


maxSize: number = size_max

Defined in: src/internal/file_index.ts:31


readonly size: number

Defined in: ../../node_modules/typescript/lib/lib.es2015.collection.d.ts:46

the number of elements in the Map.

Map.size


readonly static [species]: MapConstructor

Defined in: ../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:317

Map.[species]

get byteSize(): number

Defined in: src/internal/file_index.ts:60

Get the size in bytes of the index (including the size reported for each entry)

number

_alloc(): number

Defined in: src/internal/file_index.ts:113

Internal

Get the next available ID in the index

number


[iterator](): MapIterator<[string, Inode]>

Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:141

Returns an iterable of entries in the map.

MapIterator<[string, Inode]>

Map.[iterator]


clear(): void

Defined in: src/internal/file_index.ts:52

Removes all elements from the Map.

void

Map.clear


delete(key): boolean

Defined in: ../../node_modules/typescript/lib/lib.es2015.collection.d.ts:25

string

boolean

true if an element in the Map existed and has been removed, or false if the element does not exist.

Map.delete


directories(): Map<string, Record<string, number>>

Defined in: src/internal/file_index.ts:124

Gets a list of entries for each directory in the index. Use

Map<string, Record<string, number>>


directoryEntries(path): Record<string, number>

Defined in: src/internal/file_index.ts:89

string

Record<string, number>


entries(): MapIterator<[string, Inode]>

Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:146

Returns an iterable of key, value pairs for every entry in the map.

MapIterator<[string, Inode]>

Map.entries


entryByID(id): { inode: Inode; path: string; } | undefined

Defined in: src/internal/file_index.ts:83

number

{ inode: Inode; path: string; } | undefined


forEach(callbackfn, thisArg?): void

Defined in: ../../node_modules/typescript/lib/lib.es2015.collection.d.ts:29

Executes a provided function once per each key/value pair in the Map, in insertion order.

(value, key, map) => void

any

void

Map.forEach


fromJSON(json): this

Defined in: src/internal/file_index.ts:144

Loads the index from JSON data

IndexData

this


get(key): Inode | undefined

Defined in: ../../node_modules/typescript/lib/lib.es2015.collection.d.ts:34

Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.

string

Inode | undefined

Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.

Map.get


getByID(id): Inode | undefined

Defined in: src/internal/file_index.ts:79

number

Inode | undefined


getOrInsert(key, defaultValue): Inode

Defined in: ../../node_modules/typescript/lib/lib.esnext.collection.d.ts:25

Returns a specified element from the Map object. If no element is associated with the specified key, a new element with the value defaultValue will be inserted into the Map and returned.

string

Inode

Inode

The element associated with the specified key, which will be defaultValue if no element previously existed.

Map.getOrInsert


getOrInsertComputed(key, callback): Inode

Defined in: ../../node_modules/typescript/lib/lib.esnext.collection.d.ts:31

Returns a specified element from the Map object. If no element is associated with the specified key, the result of passing the specified key to the callback function will be inserted into the Map and returned.

string

(key) => Inode

Inode

The element associated with the specific key, which will be the newly computed value if no element previously existed.

Map.getOrInsertComputed


has(key): boolean

Defined in: ../../node_modules/typescript/lib/lib.es2015.collection.d.ts:38

string

boolean

boolean indicating whether an element with the specified key exists or not.

Map.has


keys(): MapIterator<string>

Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:151

Returns an iterable of keys in the map

MapIterator<string>

Map.keys


pathOf(id): string | undefined

Defined in: src/internal/file_index.ts:73

number

string | undefined


set(key, value): this

Defined in: ../../node_modules/typescript/lib/lib.es2015.collection.d.ts:42

Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

string

Inode

this

Map.set


toJSON(): IndexData

Defined in: src/internal/file_index.ts:36

Converts the index to JSON

IndexData


toString(): string

Defined in: src/internal/file_index.ts:48

Converts the index to a string

string


usage(): UsageInfo

Defined in: src/internal/file_index.ts:66

UsageInfo


values(): MapIterator<Inode>

Defined in: ../../node_modules/typescript/lib/lib.es2015.iterable.d.ts:156

Returns an iterable of values in the map

MapIterator<Inode>

Map.values


static groupBy<K, T>(items, keySelector): Map<K, T[]>

Defined in: ../../node_modules/typescript/lib/lib.es2024.collection.d.ts:23

Groups members of an iterable according to the return value of the passed callback.

K

T

Iterable<T>

An iterable.

(item, index) => K

A callback which will be invoked for each item in items.

Map<K, T[]>

Map.groupBy


static parse(data): Index

Defined in: src/internal/file_index.ts:163

Parses an index from a string

string

Index