happy-opfs
    Preparing search index...

    Function emptyDir

    • Empties all contents of a directory at the specified path. If the directory doesn't exist, it will be created.

      Parameters

      • dirPath: string

        The absolute path of the directory to empty.

      Returns AsyncVoidIOResult

      A promise that resolves to an AsyncVoidIOResult indicating success or failure.

      1.0.9

      • mkdir for creating directories
      • remove for removing directories
      await emptyDir('/path/to/directory');