MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / classifyImportedAsset

Function classifyImportedAsset

apps/desktop/src/main/vault.ts:2843–2850  ·  view source on GitHub ↗
(filename: string)

Source from the content-addressed store, hash-verified

2841}
2842
2843function classifyImportedAsset(filename: string): ImportedAssetKind {
2844 const ext = path.extname(filename).toLowerCase()
2845 if (IMAGE_EXTENSIONS.has(ext)) return 'image'
2846 if (PDF_EXTENSIONS.has(ext)) return 'pdf'
2847 if (AUDIO_EXTENSIONS.has(ext)) return 'audio'
2848 if (VIDEO_EXTENSIONS.has(ext)) return 'video'
2849 return 'file'
2850}
2851
2852async function assetMetaForPath(root: string, abs: string): Promise<AssetMeta> {
2853 const stat = await fs.stat(abs)

Callers 3

assetMetaForPathFunction · 0.85
walkFunction · 0.85
importFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected