USAGE: edit

WRITE destination value /binary /string /direct /append /no-wait /lines /part size /with end-of-line /allow access /mode args /custom params

DESCRIPTION: edit

Writes to a file, url, or port-spec (block or object).

WRITE is a native value.

ARGUMENTS edit

  • destination -- (Type: file url object block)
  • value -- (Type: any)

REFINEMENTS edit

  • /binary -- Preserves contents exactly.
  • /string -- Translates all line terminators.
  • /direct -- Opens the port without buffering.
  • /append -- Writes to the end of an existing file.
  • /no-wait -- Returns immediately without waiting if no data.
  • /lines -- Handles data as lines.
  • /part -- Reads a specified amount of data.
    • size -- (Type: number)
  • /with -- Specifies alternate line termination.
    • end-of-line -- (Type: char string)
  • /allow -- Specifies the protection attributes when created.
    • access -- (Type: block)
  • /mode -- Block of above refinements.
    • args -- (Type: block)
  • /custom -- Allows special refinements.
    • params -- (Type: block)

SOURCE CODE edit

write: native[
    {Writes to a file, url, or port-spec (block or object).} 
    destination [file! url! object! block!] 
    value 
    /binary "Preserves contents exactly." 
    /string "Translates all line terminators." 
    /direct "Opens the port without buffering." 
    /append "Writes to the end of an existing file." 
    /no-wait "Returns immediately without waiting if no data." 
    /lines "Handles data as lines." 
    /part "Reads a specified amount of data." 
    size [number!] 
    /with "Specifies alternate line termination." 
    end-of-line [char! string!] 
    /allow "Specifies the protection attributes when created." 
    access [block!] 
    /mode "Block of above refinements." 
    args [block!] 
    /custom "Allows special refinements." 
    params [block!]
]