MCPcopy Index your code
hub / github.com/callstack/agent-device / listDevStateDirs

Function listDevStateDirs

scripts/clean-daemon.ts:76–86  ·  view source on GitHub ↗
(devRoot: string)

Source from the content-addressed store, hash-verified

74}
75
76function listDevStateDirs(devRoot: string): string[] {
77 let entries: fs.Dirent[];
78 try {
79 entries = fs.readdirSync(devRoot, { withFileTypes: true });
80 } catch {
81 return [];
82 }
83 return entries
84 .filter((entry) => entry.isDirectory())
85 .map((entry) => path.join(devRoot, entry.name));
86}
87
88function hasLiveDaemon(stateDir: string): boolean {
89 const dirInfo = readDaemonInfo(path.join(stateDir, 'daemon.json'));

Callers 1

pruneStaleDevStateDirsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected