Function openFolderOrFile

  • Open the folder where the file is located.

    Parameters

    • dirName: string = 'Downloads'

      The name of the directory, default is Downloads.

    • Optional options: OpenFolderOrFileOptions

      Additional options: fileName and reveal.

    Returns Promise<void>

    Promise of void.

    Example

    await openFolderOrFile('Documents') - Open the folder
    await openFolderOrFile('Documents', {reveal: true}) - Reveal the folder
    await openFolderOrFile('Documents', {fileName: 'example.pdf'}) - Open the file
    await openFolderOrFile('Documents', {fileName: 'example.pdf', reveal: true}) - Reveal the file

Generated using TypeDoc