Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFile ¶
CreateFile creates a new file, failing if anything already exists at the path. It is equivalent to OpenFile with O_RDWR|O_CREATE|O_EXCL flags and 0600 permissions (owner read/write only).
func OpenFile ¶
OpenFile behaves like os.OpenFile, except that:
- Any missing parent directories in the path are created implicitly
- Ownership of the file (and any created parent directories) are set to match that of the nearest existing ancestor, when OpenFile creates them.
Everything below the nearest existing ancestor is created through handles rather than paths, files are created exclusively, and ownership only changes on what OpenFile created, so a planted symlink or file cannot make OpenFile hand over an existing file, or make CreateFile write to one. Symlinked directories are still followed, so a planted one can change where a new file is created; it still takes the ownership of the nearest existing ancestor.
Types ¶
This section is empty.