(full: string, entry: Dirent)
| 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. |
| 2016 | async 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 | |
| 2029 | async function realpathOrResolve(p: string): Promise<string> { |
| 2030 | try { |
no test coverage detected