MCPcopy Create free account
hub / github.com/contentlayerdev/contentlayer / symlink

Function symlink

packages/@contentlayer/utils/src/node/fs.ts:164–178  ·  view source on GitHub ↗
({
  targetPath,
  symlinkPath,
  type,
}: {
  targetPath: string
  symlinkPath: string
  type: SymlinkType
})

Source from the content-addressed store, hash-verified

162 * NOTE: symlinks are not supported widely on Windows
163 */
164const symlink = ({
165 targetPath,
166 symlinkPath,
167 type,
168}: {
169 targetPath: string
170 symlinkPath: string
171 type: SymlinkType
172}): T.Effect<OT.HasTracer, SymlinkError, void> =>
173 OT.withSpan('symlink', { attributes: { targetPath, symlinkPath, type } })(
174 T.tryCatchPromise(
175 () => fs.symlink(targetPath, symlinkPath, type),
176 (error) => new SymlinkError({ targetPath, symlinkPath, type, error }),
177 ),
178 )
179
180export const NodeFsLive = L.fromValue(FsTag)({
181 fileOrDirExists,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…