MCPcopy
hub / github.com/marktext/marktext / isFile

Function isFile

packages/desktop/src/common/filesystem/index.ts:64–70  ·  view source on GitHub ↗
(filepath: string)

Source from the content-addressed store, hash-verified

62 * Returns true if the path is a file with read access.
63 */
64export const isFile = (filepath: string): boolean => {
65 try {
66 return lstatSync(filepath).isFile()
67 } catch {
68 return false
69 }
70}
71
72/**
73 * Returns true if the path is a file or a symbolic link to a file with read

Callers 7

filesHandlerFunction · 0.90
openFileOrFolderFunction · 0.90
isUpdatableFunction · 0.90
normalizeAndResolvePathFunction · 0.90
isImageFileFunction · 0.90
isMarkdownFileFunction · 0.90
isFile2Function · 0.85

Calls 1

isFileMethod · 0.80

Tested by

no test coverage detected