MCPcopy Index your code
hub / github.com/simstudioai/sim / getFileType

Function getFileType

apps/sim/app/api/tools/ssh/utils.ts:394–402  ·  view source on GitHub ↗
(attrs: Attributes)

Source from the content-addressed store, hash-verified

392 * Get file type from attributes mode bits
393 */
394export function getFileType(attrs: Attributes): 'file' | 'directory' | 'symlink' | 'other' {
395 const mode = attrs.mode
396 const fileType = mode & S_IFMT
397
398 if (fileType === S_IFDIR) return 'directory'
399 if (fileType === S_IFREG) return 'file'
400 if (fileType === S_IFLNK) return 'symlink'
401 return 'other'
402}

Callers 2

route.tsFile · 0.90
route.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected