hammerspoon2-docs
    Preparing search index...

    Function toFile

    • Write a JavaScript object to a plist file on disk. Keys must be strings. Values may be strings, numbers, booleans, arrays, or nested objects. JavaScript null values are not plist-compatible and will cause the write to fail.

      Parameters

      • path: string

        Destination file path

      • data: Record<string, any>

        A JavaScript object to serialize as a property list

      • Optionalbinary: boolean

        If true, write binary plist format; if false (default), write XML plist format

      Returns boolean

      true if the file was written successfully