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

Function assetMetaForPath

apps/desktop/src/main/vault.ts:2852–2863  ·  view source on GitHub ↗
(root: string, abs: string)

Source from the content-addressed store, hash-verified

2850}
2851
2852async function assetMetaForPath(root: string, abs: string): Promise<AssetMeta> {
2853 const stat = await fs.stat(abs)
2854 const rel = toPosix(path.relative(root, abs))
2855 return {
2856 path: rel,
2857 name: path.basename(abs),
2858 kind: classifyImportedAsset(abs),
2859 siblingOrder: 0,
2860 size: stat.size,
2861 updatedAt: stat.mtimeMs
2862 }
2863}
2864
2865async function assertAssetFile(root: string, rel: string): Promise<{ rel: string; abs: string }> {
2866 const normalized = normalizeVaultRelativePath(rel)

Callers 4

renameAssetFunction · 0.85
moveAssetFunction · 0.85
duplicateAssetFunction · 0.85
restoreDeletedAssetFunction · 0.85

Calls 2

classifyImportedAssetFunction · 0.85
toPosixFunction · 0.70

Tested by

no test coverage detected