MCPcopy
hub / github.com/codeaashu/claude-code / ensureAgentDirectoryExists

Function ensureAgentDirectoryExists

src/components/agents/agentFileUtils.ts:154–160  ·  view source on GitHub ↗

* Ensures the directory for an agent location exists

(
  source: SettingSource,
)

Source from the content-addressed store, hash-verified

152 * Ensures the directory for an agent location exists
153 */
154async function ensureAgentDirectoryExists(
155 source: SettingSource,
156): Promise<string> {
157 const dirPath = getAgentDirectoryPath(source)
158 await mkdir(dirPath, { recursive: true })
159 return dirPath
160}
161
162/**
163 * Saves an agent to the filesystem

Callers 1

saveAgentToFileFunction · 0.85

Calls 2

getAgentDirectoryPathFunction · 0.85
mkdirFunction · 0.85

Tested by

no test coverage detected