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

Function symlink

packages/@contentlayer/utils/src/fs-in-memory.ts:162–176  ·  view source on GitHub ↗
({
  targetPath,
  symlinkPath,
  type,
}: {
  targetPath: string
  symlinkPath: string
  type: SymlinkType
})

Source from the content-addressed store, hash-verified

160 * NOTE: symlinks are not supported widely on Windows
161 */
162export const symlink = ({
163 targetPath,
164 symlinkPath,
165 type,
166}: {
167 targetPath: string
168 symlinkPath: string
169 type: SymlinkType
170}): T.Effect<OT.HasTracer, SymlinkError, void> =>
171 OT.withSpan('symlink', { attributes: { targetPath, symlinkPath, type } })(
172 T.tryCatch(
173 () => fs.symlinkSync(targetPath, symlinkPath, type),
174 (error) => new SymlinkError({ targetPath, symlinkPath, type, error }),
175 ),
176 )
177
178export const InMemoryFsLive = L.fromValue(FsTag)({
179 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…