( asset: Pick<AssetMeta, 'path'>, settings: VaultSettings | null | undefined )
| 1248 | } |
| 1249 | |
| 1250 | export function assetFolderSubpath( |
| 1251 | asset: Pick<AssetMeta, 'path'>, |
| 1252 | settings: VaultSettings | null | undefined |
| 1253 | ): string { |
| 1254 | const folder = folderForVaultRelativePath(asset.path, settings) |
| 1255 | if (!folder) return '' |
| 1256 | const within = assetPathWithinFolder(asset.path, folder, settings) |
| 1257 | const parts = within.split('/').filter(Boolean) |
| 1258 | return parts.length > 1 ? parts.slice(0, -1).join('/') : '' |
| 1259 | } |
| 1260 | |
| 1261 | export function assetBelongsToFolderView( |
| 1262 | asset: Pick<AssetMeta, 'path'>, |
no test coverage detected