Module Stdio
- Constant DATA_CHUNK_SIZE
final constant int Stdio.DATA_CHUNK_SIZE
- Description
Size used in various places to divide incoming or outgoing data into chunks.
- Constant DN_ACCESS
constant Stdio.DN_ACCESS
- Description
Used in File.notify() to get a callback when files within a directory are accessed.
- Constant DN_ATTRIB
constant Stdio.DN_ATTRIB
- Description
Used in File.notify() to get a callback when attributes of files within a directory are changed.
- Constant DN_CREATE
constant Stdio.DN_CREATE
- Description
Used in File.notify() to get a callback when new files are created within a directory.
- Constant DN_DELETE
constant Stdio.DN_DELETE
- Description
Used in File.notify() to get a callback when files are deleted within a directory.
- Constant DN_MODIFY
constant Stdio.DN_MODIFY
- Description
Used in File.notify() to get a callback when files within a directory are modified.
- Constant DN_MULTISHOT
constant Stdio.DN_MULTISHOT
- Description
Used in File.notify(). If DN_MULTISHOT is used, signals will be sent for all notifications the program has registred for. Otherwise only the first event the program is listening for will be received and then the program must reregister for the events to receive futher events.
- Constant DN_RENAME
constant Stdio.DN_RENAME
- Description
Used in File.notify() to get a callback when files within a directory are renamed.
- Constant NOTE_ATTRIB
constant int Stdio.NOTE_ATTRIB
- Constant NOTE_DELETE
constant int Stdio.NOTE_DELETE
- Constant NOTE_EXTEND
constant int Stdio.NOTE_EXTEND
- Constant NOTE_LINK
constant int Stdio.NOTE_LINK
- Constant NOTE_RENAME
constant int Stdio.NOTE_RENAME
- Constant NOTE_REVOKE
constant int Stdio.NOTE_REVOKE
- Constant NOTE_WRITE
constant int Stdio.NOTE_WRITE
- Constant PROP_BIDIRECTIONAL
constant int Stdio.PROP_BIDIRECTIONAL
- Description
The file is bi-directional.
- See also
- Constant PROP_BUFFERED
constant int Stdio.PROP_BUFFERED
- Description
The file is buffered (usually 4KB).
- See also
- Constant PROP_IPC
constant int Stdio.PROP_IPC
- Description
The file may be used for inter process communication.
- See also
- Constant PROP_NONBLOCK
constant int Stdio.PROP_NONBLOCK
- Description
The file supports nonblocking I/O.
- See also
- Constant PROP_REVERSE
constant int Stdio.PROP_REVERSE
- Description
Request reversed operation.
Used as argument to Stdio.File()->pipe(), when PROP_BIDIRECTIONAL hasn't been specified, to request the direction of the resulting pipe to reversed.
- See also
- Constant PROP_SEND_FD
constant int Stdio.PROP_SEND_FD
- Description
The Stdio.File object might support the Stdio.File()->send_fd() operation.
- See also
Stdio.File()->pipe(), Stdio.File()->send_fd(), Stdio.File()->receive_fd()
- Constant PROP_SHUTDOWN
constant int Stdio.PROP_SHUTDOWN
- Description
The file supports shutting down transmission in either direction.
- See also
- Constant TCSADRAIN
constant string Stdio.TCSADRAIN
- Description
Argument to Stdio.File()->tcsetattr().
Change after all output has been written.
- Constant TCSAFLUSH
constant string Stdio.TCSAFLUSH
- Description
Argument to Stdio.File()->tcsetattr().
Change after all output has been written, and empty the input buffers.
- Constant TCSANOW
constant string Stdio.TCSANOW
- Description
Argument to Stdio.File()->tcsetattr().
Change immediately.
- Constant XATTR_CREATE
constant Stdio.XATTR_CREATE
- Description
Used by setxattr function and method to signify a pure create, which will fail if the attribute already exists.
- Constant XATTR_REPLACE
constant Stdio.XATTR_REPLACE
- Description
Used by setxattr function and method to signify a replace, which will fail the the attribute does not already exists.
- Constant __HAVE_OOB__
constant Stdio.__HAVE_OOB__
- Description
Exists and has the value 1 if OOB operations are available.
- Note
In Pike 7.5 and later OOB operations are always present.
- Constant __HAVE_SEND_FD__
constant Stdio.__HAVE_SEND_FD__
- Description
Support for sending of file descriptors over Stdio.File()->pipe() objects with PROP_SEND_FD capability is supported.
- See also
Stdio.File()->send_fd(), Stdio.File()->receive_fd(), Stdio.File()->read(), Stdio.File()->write(), Stdio.File()->pipe()
- Constant __OOB__
constant Stdio.__OOB__
- Description
Implementation level of nonblocking I/O OOB support.
0 Nonblocking OOB support is not supported.
1 Nonblocking OOB works a little.
2 Nonblocking OOB almost works.
3 Nonblocking OOB works as intended.
-1 Unknown level of nonblocking OOB support.
This constant only exists when OOB operations are available, i.e. when __HAVE_OOB__ is 1.
- Inherit files
inherit files : files
- Variable stderr
FILE Stdio.stderr
- Description
An instance of FILE("stderr"), the standard error stream. Use this when you want to output error messages.
- See also
- Variable stdin
FILE Stdio.stdin
- Description
An instance of FILE("stdin"), the standard input stream. Use this when you want to read anything from the standard input. This example will read lines from standard input for as long as there are more lines to read. Each line will then be written to stdout together with the line number. We could use Stdio.stdout.write() instead of just write(), since they are the same function.
- Example
int main() { int line; while(string s=Stdio.stdin.gets()) write("%5d: %s\n", line++, s); }