How to use the @expo/osascript.openFinderToFolderAsync function in @expo/osascript

To help you get started, we’ve selected a few @expo/osascript examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo-cli / packages / xdl / src / FileSystem.ts View on Github external
export async function openFolderAsync(dir: string) {
  if (process.platform === 'darwin') {
    return await osascript.openFinderToFolderAsync(dir);
  } else if (process.platform === 'win32') {
    return await spawnAsync('explorer', [dir]);
  } else {
    throw new XDLError('PLATFORM_NOT_SUPPORTED', 'openFolderAsync not supported');
  }
}

@expo/osascript

Tools for running an osascripts in Node

MIT
Latest version published 2 months ago

Package Health Score

89 / 100
Full package analysis