Rebol Programming/open


OPEN spec /binary /string /direct /seek /new /read /write /no-wait /lines /with end-of-line /allow access /mode args /custom params /skip length 


Opens a new port connection.

OPEN is a native value.


  • spec -- (Type: file url port object block)


  • /binary -- Preserves contents exactly.
  • /string -- Translates all line terminators.
  • /direct -- Opens the port without buffering.
  • /seek -- Opens port in seek mode without buffering.
  • /new -- Creates a file. (Need not already exist.)
  • /read -- Read only. Disables write operations.
  • /write -- Write only. Disables read operations.
  • /no-wait -- Returns immediately without waiting if no data.
  • /lines -- Handles data as lines.
  • /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)
  • /skip -- Skips a number of bytes.
    • length -- (Type: number)


open: native[
    "Opens a new port connection." 
    spec [file! url! port! object! block!] 
    /binary "Preserves contents exactly." 
    /string "Translates all line terminators." 
    /direct "Opens the port without buffering." 
    /seek "Opens port in seek mode without buffering." 
    /new "Creates a file. (Need not already exist.)" 
    /read "Read only. Disables write operations." 
    /write "Write only.  Disables read operations." 
    /no-wait "Returns immediately without waiting if no data." 
    /lines "Handles data as lines." 
    /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!] 
    /skip "Skips a number of bytes." 
    length [number!]