Changeset 14787 in project


Ignore:
Timestamp:
05/26/09 04:57:40 (10 years ago)
Author:
Jim Ursetto
Message:

Changes applied for zbigniew (71.201.84.72) through svnwiki:

wiki/posix: describe file-open flags parameter a bit more

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/man/4/Unit posix

    r14729 r14787  
    279279
    280280Opens the file specified with the string {{FILENAME}} and open-flags
    281 {{FLAGS}} using the C function {{open()}}. On success a
    282 file-descriptor for the opened file is returned.  {{FLAGS}}
    283 should be a bitmask containing one or more of the {{open/...}}
     281{{FLAGS}} using the C function {{open(2)}}. On success a
     282file-descriptor for the opened file is returned.
     283
     284{{FLAGS}} is a bitmask of {{open/...}}
    284285values '''or'''ed together using {{bitwise-ior}} (or simply added
    285 together).  The optional {{MODE}} should be a bitmask composed of one
     286together).  You must provide exactly one of the access flags {{open/rdonly}}, {{open/wronly}}, or {{open/rdwr}}.  Additionally, you may provide zero or more creation flags ({{open/creat}}, {{open/excl}}, {{open/trunc}}, and {{open/noctty}}) and status flags (the remaining {{open/...}} values).  For example, to open a possibly new output file for appending:
     287
     288 (file-open "/tmp/hen.txt" (+ open/wronly open/append open/creat))
     289
     290The optional {{MODE}} should be a bitmask composed of one
    286291or more permission values like {{perm/irusr}} and is only relevant
    287292when a new file is created. The default mode is
Note: See TracChangeset for help on using the changeset viewer.