/
githubmirror
/
marktext
Обзор
Документация
Войти
/
githubmirror
/
marktext
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/desktop/src/main/ipc/paths.ts
12 строк
589 B
Ran Luo
chore: convert repo to pnpm monorepo (packages/desktop, muyajs, website) (#4302)
29 май 2026, 05:25
Не верифицирован
29 май 2026, 05:25
565bfcd
Код
Авторство
О чём код?
import { ipcMain } from 'electron' import { isSamePathSync, isImageFile } from 'common/filesystem/paths' export const registerPathHandlers = (): void => { // The renderer's preload computes isChildOfDirectory / hasMarkdownExtension // locally (pure string ops, no IPC). Only `is-same-sync` and `is-image` // require fs in the rare case-insensitive / image-file path checks. ipcMain.on('mt::paths::is-same-sync', (event, a: string, b: string) => { event.returnValue = isSamePathSync(a, b, true) }) ipcMain.handle('mt::paths::is-image', (_e, p: string) => isImageFile(p)) }