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

Function isExcalidrawFileEntry

apps/desktop/src/main/vault.ts:2016–2027  ·  view source on GitHub ↗
(full: string, entry: Dirent)

Source from the content-addressed store, hash-verified

2014// `.excalidraw` drawings are listed alongside notes (so they show in the sidebar
2015// tree); the sidebar/editor route them by extension to the drawing view.
2016async function isExcalidrawFileEntry(full: string, entry: Dirent): Promise<boolean> {
2017 if (!isExcalidrawPath(entry.name)) return false
2018 if (entry.isFile()) return true
2019 if (entry.isSymbolicLink()) {
2020 try {
2021 return (await fs.stat(full)).isFile()
2022 } catch {
2023 return false
2024 }
2025 }
2026 return false
2027}
2028
2029async function realpathOrResolve(p: string): Promise<string> {
2030 try {

Callers 1

walkFolderFunction · 0.85

Calls 1

isExcalidrawPathFunction · 0.90

Tested by

no test coverage detected