REBOL Programming/write

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.

ARGUMENTSEdit

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

REFINEMENTSEdit

  • /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 CODEEdit

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!]
]
Last modified on 13 November 2012, at 10:42