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

Function isExecutableFile

src/utils/swift-cache.ts:162–169  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

160}
161
162function isExecutableFile(filePath: string): boolean {
163 try {
164 fs.accessSync(filePath, fs.constants.X_OK);
165 return fs.statSync(filePath).isFile();
166 } catch {
167 return false;
168 }
169}
170
171function sanitizeCacheName(value: string): string {
172 return value.replaceAll(/[^A-Za-z0-9._-]/g, '-').replaceAll(/^-+|-+$/g, '') || 'swift-helper';

Callers 2

ensureSwiftExecutableFunction · 0.85
acquireSwiftCacheLockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected