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

Method handleFileModified

packages/cli/src/util/dev/server.ts:466–484  ·  view source on GitHub ↗
(
    fsPath: string,
    changed: Set<string>,
    removed: Set<string>
  )

Source from the content-addressed store, hash-verified

464 }
465
466 async handleFileModified(
467 fsPath: string,
468 changed: Set<string>,
469 removed: Set<string>
470 ): Promise<void> {
471 const name = relative(this.cwd, fsPath);
472 try {
473 this.files[name] = await FileFsRef.fromFsPath({ fsPath });
474 fileChanged(name, changed, removed);
475 output.debug(`File modified: ${name}`);
476 } catch (err: unknown) {
477 if (isErrnoException(err) && err.code === 'ENOENT') {
478 output.debug(`File modified, but has since been deleted: ${name}`);
479 fileRemoved(name, this.files, changed, removed);
480 } else {
481 throw err;
482 }
483 }
484 }
485
486 async updateBuildMatches(
487 vercelConfig: VercelConfig,

Callers 1

Calls 6

relativeFunction · 0.90
isErrnoExceptionFunction · 0.90
fileChangedFunction · 0.85
fileRemovedFunction · 0.85
fromFsPathMethod · 0.80
debugMethod · 0.80

Tested by

no test coverage detected