store-entry
Functions
markStoreEntryCopied()
function markStoreEntryCopied(storeEntry): voidDefined 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()
function removeStoreEntry(storeEntry): voidDefined 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()
function storeCopiedPath(storeEntry): stringDefined 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.
Parameters
| Parameter | Type |
|---|---|
storeEntry | string |
Returns
string
storeEntryCopied()
function storeEntryCopied(storeEntry, index): booleanDefined 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 |
Returns
boolean
storeEntryLastCopied()
function storeEntryLastCopied(storeEntry): numberDefined 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).
Parameters
| Parameter | Type |
|---|---|
storeEntry | string |
Returns
number
storeEntryLinked()
function storeEntryLinked(storeEntry, index): booleanDefined 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 |
Returns
boolean
storeEntryNames()
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()
function storeEntryTime(storeEntry): numberDefined 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()
function verifyStoreEntry(storeEntry, tarData): undefined | stringDefined 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