---
title: "@vltpkg/tar: store-entry — vlt docs"
description: "Documentation for the vlt client and the vlt registry."
url: "https://docs.vlt.io/client/api-reference/tar/store-entry"
image: "https://docs.vlt.io/og/client/api-reference/tar/store-entry"
lang: "en"
---

# store-entry

## Functions

### markStoreEntryCopied()

```ts
function markStoreEntryCopied(storeEntry): void
```

Defined in: tar/src/store-entry.ts:56

Mark a global store entry as copied from, now. Called on uses that nlink cannot show (copies, clones, links copied before install scripts): one create per entry, then a touch per use, so prune-store can tell an entry still in use from one long forgotten.

#### Parameters

| Parameter    | Type     |
| ------------ | -------- |
| `storeEntry` | `string` |

#### Returns

`void`

---

### removeStoreEntry()

```ts
function removeStoreEntry(storeEntry): void
```

Defined in: tar/src/store-entry.ts:74

Remove a global store entry. Dir first: a sidecar without its dir is a plain miss. Projects linked from it keep their files.

#### Parameters

| Parameter    | Type     |
| ------------ | -------- |
| `storeEntry` | `string` |

#### Returns

`void`

---

### storeCopiedPath()

```ts
function storeCopiedPath(storeEntry): string
```

Defined in: tar/src/store-entry.ts:47

Marker next to a global store entry: some install copied or cloned from it, so its files' nlink cannot show use; its mtime is the last time one did. See [markStoreEntryCopied](https://docs.vlt.io/client/api-reference/tar/store-entry.md#markstoreentrycopied).

#### Parameters

| Parameter    | Type     |
| ------------ | -------- |
| `storeEntry` | `string` |

#### Returns

`string`

---

### storeEntryCopied()

```ts
function storeEntryCopied(storeEntry, index): boolean
```

Defined in: tar/src/store-entry.ts:103

True if the global store entry has a valid sidecar and dir, and was copied from (marker) or has install scripts (copied before they run). `index`: the sidecar, if already read.

#### Parameters

| Parameter    | Type                                                                                                  |
| ------------ | ----------------------------------------------------------------------------------------------------- |
| `storeEntry` | `string`                                                                                              |
| `index`      | `undefined` \| [`StoreIndex`](https://docs.vlt.io/client/api-reference/tar/store-index.md#storeindex) |

#### Returns

`boolean`

---

### storeEntryLastCopied()

```ts
function storeEntryLastCopied(storeEntry): number
```

Defined in: tar/src/store-entry.ts:94

When a global store entry was last copied from, in ms: its marker's mtime, else when it was written ([storeEntryTime](https://docs.vlt.io/client/api-reference/tar/store-entry.md#storeentrytime)).

#### Parameters

| Parameter    | Type     |
| ------------ | -------- |
| `storeEntry` | `string` |

#### Returns

`number`

---

### storeEntryLinked()

```ts
function storeEntryLinked(storeEntry, index): boolean
```

Defined in: tar/src/store-entry.ts:118

True if a file of the global store entry has another hardlink (nlink > 1), i.e. some `node_modules` uses it. Without a valid sidecar nothing can link from it, so false. `index`: the sidecar, if already read.

#### Parameters

| Parameter    | Type                                                                                                  |
| ------------ | ----------------------------------------------------------------------------------------------------- |
| `storeEntry` | `string`                                                                                              |
| `index`      | `undefined` \| [`StoreIndex`](https://docs.vlt.io/client/api-reference/tar/store-index.md#storeindex) |

#### Returns

`boolean`

---

### storeEntryNames()

```ts
function storeEntryNames(root): string[]
```

Defined in: tar/src/store-entry.ts:27

Integrity hex names of the global store entries under `root`, each with an entry dir, a sidecar index or a copied marker. Sorted.

#### Parameters

| Parameter | Type     |
| --------- | -------- |
| `root`    | `string` |

#### Returns

`string`\[]

---

### storeEntryTime()

```ts
function storeEntryTime(storeEntry): number
```

Defined in: tar/src/store-entry.ts:84

When a global store entry was written, in ms: its sidecar's mtime, else its dir's, else 0.

#### Parameters

| Parameter    | Type     |
| ------------ | -------- |
| `storeEntry` | `string` |

#### Returns

`number`

---

### verifyStoreEntry()

```ts
function verifyStoreEntry(storeEntry, tarData): undefined | string
```

Defined in: tar/src/store-entry.ts:144

Check a global store entry against the tarball it was exploded from: sidecar index, file list, every file's bytes and exec bit (not on Windows). Returns why it does not match, or undefined if it does.

#### Parameters

| Parameter    | Type     |
| ------------ | -------- |
| `storeEntry` | `string` |
| `tarData`    | `Buffer` |

#### Returns

`undefined` | `string`
