MCPcopy
hub / github.com/YILS-LIN/short-video-factory / canUsePath

Function canUsePath

electron/ipc.ts:29–40  ·  view source on GitHub ↗
(folderPath?: string | null)

Source from the content-addressed store, hash-verified

27 : RENDERER_DIST
28
29function canUsePath(folderPath?: string | null) {
30 if (!folderPath) {
31 return false
32 }
33
34 try {
35 fs.accessSync(folderPath, fs.constants.R_OK)
36 return true
37 } catch {
38 return false
39 }
40}
41
42function tryGetElectronPath(name: Parameters<typeof app.getPath>[0]) {
43 try {

Callers 1

resolveDefaultFolderPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected