MCPcopy Index your code
hub / github.com/coder/coder / existsFile

Function existsFile

site/src/utils/filetree.ts:51–53  ·  view source on GitHub ↗
(path: string, fileTree: FileTree)

Source from the content-addressed store, hash-verified

49};
50
51export const existsFile = (path: string, fileTree: FileTree) => {
52 return has(fileTree, path.split("/"));
53};
54
55export const removeFile = (path: string, fileTree: FileTree) => {
56 const updatedFileTree = structuredClone(fileTree);

Callers 5

filetree.test.tsFile · 0.90
TemplateVersionEditorFunction · 0.90
getActivePathFunction · 0.90
createFileFunction · 0.85
validatePathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected