happy-opfs
    Preparing search index...

    Function copySync

    • Synchronous version of copy. Copies a file or directory from one location to another.

      Parameters

      • srcPath: string

        The source path.

      • destPath: string

        The destination path.

      • Optionaloptions: CopyOptions

        Optional copy options.

      Returns VoidIOResult

      A VoidIOResult indicating success or failure.

      copy for the async version.

      1.7.0

      // Copy a file
      copySync('/src/file.txt', '/dest/file.txt');

      // Copy without overwriting
      copySync('/src', '/dest', { overwrite: false });