Skip to main content

Function: copyOrLinkFile()

copyOrLinkFile(src, dest, stats?, isUseHardLink?, exDevErrorHandler?): Promise<any>

Hard links is used if supported and allowed. File permission is fixed — allow execute for all if owner can, allow read for all if owner can.

ensureDir is not called, dest parent dir must exists

Parameters

src

string

dest

string

stats?

Stats | null

boolean

exDevErrorHandler?

(() => boolean) | null

Returns

Promise<any>