vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
    • Overview
    • clonefile
    • link-tree
    • index
    • pool
    • Reference
    • store-entry
    • store-index
    • unpack
  • Functions
  • cloneAvailable()
  • cloneDir()
  1. Client
  2. /
  3. API Reference
  4. /
  5. @vltpkg/tar
  6. /
  7. clonefile

clonefile

Functions

cloneAvailable()

TypeScript
function cloneAvailable(): boolean

Defined in: tar/src/clonefile.ts:106

True where cloneDir can work: macOS, on a Node whose node:ffi loads. Being built in is not enough: the permission model without --allow-ffi denies it. Loads it, once.

Returns

boolean


cloneDir()

TypeScript
function cloneDir(src, dst): string | true

Defined in: tar/src/clonefile.ts:115

Clone the directory src to dst, which must not exist, with clonefile(2). Returns true, or the errno code of the failure: ENOTSUP where cloning is unavailable (not macOS, no node:ffi, a filesystem without clones), EXDEV across volumes, ENOENT for a missing source, and so on.

Parameters

ParameterType
srcstring
dststring

Returns

string | true


Previous@vltpkg/tarNextlink-tree

On this page

  • Functions
  • cloneAvailable()
  • cloneDir()

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now