store-entry
Functions
markStoreEntryCopied()
function markStoreEntryCopied(storeEntry): voidDefined in: store-entry.ts:52
Mark a global store entry as copied from. Called on copies only: one exclusive create per entry, a failed open after that.
Parameters
| Parameter | Type |
|---|---|
storeEntry | string |
Returns
void
removeStoreEntry()
function removeStoreEntry(storeEntry): voidDefined in: store-entry.ts:64
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: store-entry.ts:45
Marker next to a global store entry: some install copied from it, so its files' nlink cannot show use. See markStoreEntryCopied.
Parameters
| Parameter | Type |
|---|---|
storeEntry | string |
Returns
string
storeEntryCopied()
function storeEntryCopied(storeEntry, index): booleanDefined in: store-entry.ts:85
True if the global store entry has a valid sidecar and dir, and was
copied from (marker) or has install scripts (always copied). index:
the sidecar, if already read.
Parameters
| Parameter | Type |
|---|---|
storeEntry | string |
index | undefined | StoreIndex |
Returns
boolean
storeEntryLinked()
function storeEntryLinked(storeEntry, index): booleanDefined in: store-entry.ts:100
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: store-entry.ts:26
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: store-entry.ts:74
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: store-entry.ts:126
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