MCPcopy Create free account
hub / github.com/vercel/vercel / fromFsPath

Method fromFsPath

packages/build-utils/src/file-fs-ref.ts:46–60  ·  view source on GitHub ↗
({
    mode,
    contentType,
    fsPath,
    size,
  }: FileFsRefOptions)

Source from the content-addressed store, hash-verified

44 }
45
46 static async fromFsPath({
47 mode,
48 contentType,
49 fsPath,
50 size,
51 }: FileFsRefOptions): Promise<FileFsRef> {
52 let m = mode;
53 let s = size;
54 if (!m || typeof s === 'undefined') {
55 const stat = await fs.lstat(fsPath);
56 m = stat.mode;
57 s = stat.size;
58 }
59 return new FileFsRef({ mode: m, contentType, fsPath, size: s });
60 }
61
62 static async fromStream({
63 mode = 0o100644,

Callers 11

createRenderNodeFunctionFunction · 0.80
createRenderEdgeFunctionFunction · 0.80
getFilesFromTraceFunction · 0.80
buildFunction · 0.80
handleFileCreatedMethod · 0.80
handleFileModifiedMethod · 0.80
fromStreamMethod · 0.80
fileFsRefCachedFunction · 0.80
downloadFileFunction · 0.80
prepareFilesystemFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected