happy-opfs
    Preparing search index...

    Function appendFileSync

    • Synchronous version of appendFile. Appends content to a file at the specified path.

      Parameters

      • filePath: string

        The absolute path of the file to append to.

      • contents: WriteSyncFileContent

        The content to append (ArrayBuffer, TypedArray, or string).

      • Optionaloptions: AppendOptions

        Optional append options.

        Options for appending to files.

        • Optionalcreate?: boolean

          Whether to create the file if it does not exist.

          true

      Returns VoidIOResult

      A VoidIOResult indicating success or failure.

      appendFile for the async version.

      1.1.0

      // Append to file, create if doesn't exist (default behavior)
      appendFileSync('/path/to/log.txt', 'New log entry\n');

      // Append only if file exists, fail if it doesn't
      appendFileSync('/path/to/log.txt', 'New log entry\n', { create: false });