| Extracted from Pike v7.8 release 866 at 2018-07-18.

[Top]
Stdio
Stdio.File

# Method Stdio.File()->create()

Method create

  `void Stdio.File()`
  `void Stdio.File(string filename)`
  `void Stdio.File(string filename, string mode)`
  `void Stdio.File(string filename, string mode, int mask)`
  `void Stdio.File(string descriptorname)`
  `void Stdio.File(int fd)`
  `void Stdio.File(int fd, string mode)`

Description

  There are four basic ways to create a Stdio.File object. The first is calling it without any arguments, in which case the you'd have to call open() , connect() or some other method which connects the File object with a stream.

  The second way is calling it with a filename and open mode . This is the same thing as cloning and then calling open() , except shorter and faster.

  The third way is to call it with descriptorname of `"stdin"`, `"stdout"` or `"stderr"`. This will open the specified standard stream.

  For the advanced users, you can use the file descriptors of the systems (note: emulated by pike on some systems - like NT). This is only useful for streaming purposes on unix systems. This is not recommended at all if you don't know what you're into. Default mode for this is `"rw"`.

Note

  Open mode will be filtered through the system UMASK. You might need to use chmod() later.

See also

  open() , connect() , Stdio.FILE ,

Method create

  `void Stdio.File(string filename)`
  `void Stdio.File(string filename, string mode)`
  `void Stdio.File(string filename, string mode, int access)`
  `void Stdio.File(int fd)`
  `void Stdio.File(int fd, string mode)`

Description

  See open() .

See also

  open()