Home / Function/ isFileInTargetPath() — vite Function Reference

isFileInTargetPath() — vite Function Reference

Architecture documentation for the isFileInTargetPath() function in static.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  2c797df0_6f8d_bb30_24cf_3a4eff202dbc["isFileInTargetPath()"]
  d91d6c8f_e2c2_3b92_12c3_391c9ba06183["static.ts"]
  2c797df0_6f8d_bb30_24cf_3a4eff202dbc -->|defined in| d91d6c8f_e2c2_3b92_12c3_391c9ba06183
  b5f75f2b_ae88_b9ce_360f_813018b7842e["isFileLoadingAllowed()"]
  b5f75f2b_ae88_b9ce_360f_813018b7842e -->|calls| 2c797df0_6f8d_bb30_24cf_3a4eff202dbc
  1bfe2c56_df21_a80a_d46e_8e769fa0b467["isSameFilePath()"]
  2c797df0_6f8d_bb30_24cf_3a4eff202dbc -->|calls| 1bfe2c56_df21_a80a_d46e_8e769fa0b467
  d9d49dad_960b_4712_7c44_9345473c62e5["isParentDirectory()"]
  2c797df0_6f8d_bb30_24cf_3a4eff202dbc -->|calls| d9d49dad_960b_4712_7c44_9345473c62e5
  style 2c797df0_6f8d_bb30_24cf_3a4eff202dbc fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/server/middlewares/static.ts lines 279–287

export function isFileInTargetPath(
  targetPath: string,
  filePath: string,
): boolean {
  return (
    isSameFilePath(targetPath, filePath) ||
    isParentDirectory(targetPath, filePath)
  )
}

Domain

Subdomains

Frequently Asked Questions

What does isFileInTargetPath() do?
isFileInTargetPath() is a function in the vite codebase, defined in packages/vite/src/node/server/middlewares/static.ts.
Where is isFileInTargetPath() defined?
isFileInTargetPath() is defined in packages/vite/src/node/server/middlewares/static.ts at line 279.
What does isFileInTargetPath() call?
isFileInTargetPath() calls 2 function(s): isParentDirectory, isSameFilePath.
What calls isFileInTargetPath()?
isFileInTargetPath() is called by 1 function(s): isFileLoadingAllowed.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free