MCPcopy
hub / github.com/ntfstool/ntfstool / openInFinder

Function openInFinder

src/common/utils/AlfwDisk.js:294–311  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

292 * @returns {Promise<any>}
293 */
294export function openInFinder(path) {
295 return new Promise((resolve, reject) => {
296 execShell(`open "${path}"`).then((res, err) => {
297 console.log({
298 res: res,
299 err: err
300 }, "openInFinder")
301 if (res.indexOf("exist") >= 0) {
302 reject()
303 } else {
304 resolve()
305 }
306 }).catch((e) => {
307 saveLog.error(e, "openInFinder ok");
308 reject(e)
309 })
310 })
311}

Callers 2

openDiskFunction · 0.90
openDiskFunction · 0.90

Calls 1

execShellFunction · 0.90

Tested by

no test coverage detected